• Hi,
    Can someone please help.

    I set up my wordpress in a different directory to the website im working on, so the current website is still hosted while I build a better improved site with wordpress. So I added a folder Called wordpress, and I could log in to the new directory fine.

    wordpress/wp-admin

    No i am happy with the site, I want to set it live, so I moved the directory up a level. It didn’t quite work, I did a bit of googling, and said all I had to do was change the permalink. So I did, I changed both permalinks, up a directory. This is where it went wrong, and now I cant log on at all.

    I tried to edit the htaccess, yet no luck

    For now I moved the wordpress back into the original directory i put it in, and the previous site is live again.

    How Can I get back to the log-on page, is it a easy fix?
    Or is there anyway I can just delete and start again?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hello,

    If you want to work from the urls root directory your .htaccess should be looking something like this.

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    This is a default and empty with only 1 rule that your index is on the root folder. Apart from that though your Database entries will also have a different folder setup for uploaded images etc.

    What I usually do is move the website on the folder I want on my server edit the htaccess to the correct directory index.php resides ( always keeping in mind that example: example.com/index.php ) means the above htaccess, that is the root folder.

    After that I use a tool like Search and Replace to search and replace wrong uris in my database to point to the new one for example

    Replace:

    https://www.example.com/test/ with https://www.example.com/

    If you are going to use it always make a Dry run first to see what is about to change and take a backup of your database to be safe either way.

    I hope this helps a bit.

    Best regards,
    Konstantinos

    Thread Starter frazerfen

    (@frazerfen)

    I moved my directory to the root

    So all files are in the ‘www’ folder

    I replaced the .htaccess with the text above, and replaced.
    Still didnt work.

    However, i did “/wp-login.php” and got a white login page.
    I log in, and I just get a generic holding page from my host.

    Hello,

    Could you give us some links as well to check if there are any errors in the console at least?

    Was there any cache or Security plugin installed on your website that might be blocking you from gaining access as you are changing the folders?

    Also the white admin screen is caused by a broken plugin or code somewhere ( this goes with the above question as well ) You could always try deactivating all plugins before moving your website to the new location in case one of them needs a ‘settings refresh’.

    I don’t know exactly what you have set up in there so I’m generally speculating of problems & common errors.

    As for your host giving you a generic page this is usually caused because the web server isn’t accepting that the index.php is it’s new front-face file. That being said the .htaccess file was probably never read correctly for some reason.

    Best regards,
    Konstantinos

    Thread Starter frazerfen

    (@frazerfen)

    Thanks for your help Konstantinos,

    I had to move the directory back, how it was previously, to keep something live.
    But pretty much get the same result.

    https://www.southlandsarts.co.uk/wordpress/wp-admin

    This link gets me an error message:-
    Not Found
    The requested URL /wordpresslwp-admin was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

    https://www.southlandsarts.co.uk/wordpress/wp-admin

    This gets me to a white log in page, when I login, I get the error message Not Found.

    Is that any help?

    I’m a bit confused now especially with the links as I see a site running on https://www.southlandsarts.co.uk/

    The https://www.southlandsarts.co.uk/wordpress/wp-admin is getting redirected to / directory so if you want it to be under /wordpress/ theres either a wrong URI in your database or your htaccess.

    You are probably getting a step wrong somewhere on the transfer. WordPress is really easy to transfer by just a simple Move/Copy files and changing the urls, nothing more.

    Best regards,
    Konstantinos

    Thread Starter frazerfen

    (@frazerfen)

    How can I rectify this?

    What do you mean? ( Sorry Greek here and sometimes it’s difficult keeping up with English ?? ).

    If you mean how to fix that redirection, it means again 2 things. Either that your WordPress / Site URL are set to https://www.southlandsarts.co.uk/ instead off https://www.southlandsarts.co.uk/wordpress/ OR the .htaccess file.

    Tell me something.

    Do you have access to your database and have some basic knowledge of just replacing a value? Plus is there already an active site on https://www.southlandsarts.co.uk/ and your wordpress is a second one ?

    ————–

    To take it from the top.

    Your .htaccess should be in the same folder as wp-config.php first of all and have this inside

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    

    If you have access to your database there is a table named wp_options. Inside there the first 2 option_name are siteurl and home, they should have a value of https://www.southlandsarts.co.uk/ .

    If htaccess and your database is like that and you move all your wordpress files from /wordpress/ to your root your site should be viewable there’s really nothing else to change than those 3 things when moving a site.

    Best regards,
    Konstantinos

    Thread Starter frazerfen

    (@frazerfen)

    Hi,

    Yes. I mean how can I fix it.

    The site is hosted on easy space, so have limited access.
    But I dont really know what Im doing with a data base.

    There is a site currently on https://www.southlandsarts.co.uk, its a website I hand coded.

    Thats why I have the directory “WordPress”

    I’ll try what you suggest.

    Before you do anything wrong as you don’t know about databases I would suggest to simply ask your host people to help you on moving your website, it’ll be a breeze for them, to avoid doing anything wrong and breaking your main site down as well.

    My previous reply with the Search and Replace script should’ve been more than enough to move your WordPress site into a new directory.

    That being said as you don’t have the technical knowledge required I’m trying to avoid the worst at the moment.

    Unfortunately I’ve exhausted all my options and recommendations on moving a website so I can’t help further.

    Again if you don’t think you’re able to get into your database I suggest don’t. Better be safe than sorry as they say ?? .

    Best regards,
    Konstantinos

    Hello again,

    I’ve been talking with the guys in here and there is another proposal that is the easiest approach so here goes and hopefully this works.

    I’ll give it to you in steps.

    1) Move the existing site from https://www.southlandsarts.co.uk to a folder to keep it as a backup.
    2) Move WordPress from https://www.southlandsarts.co.uk/wordpress to https://www.southlandsarts.co.uk
    3) Edit the wp-config.php and add define( 'RELOCATE', true );
    4) Go to https://www.southlandsarts.co.uk/wp-login.php
    5) If you see the login page, LOGIN and stop.
    6) Go edit wp-config.php again and REMOVE the define( 'RELOCATE', true );
    7) Go to your Settings in your Admin Panel and check that the WordPress URL and Site URL are the correct ones.

    Information taken from https://codex.www.ads-software.com/Changing_The_Site_URL#Steps

    Hopefully this will do it!.

    Best regards,
    Konstantinos

    Thread Starter frazerfen

    (@frazerfen)

    Hi Konstantinos,

    Yes. That worked. Although It didnt have my theme for some reason, but its ok, I re-installed the theme, and still works. Then there was the links, they seem to disappear, so i uploaded links again. I can at least work with this.

    Thank you so much!!

    Fraz

    Glad we finally made it! Awesome.

    If there’s anything else don’t hesitate to ask freely there’s always a solution around the corner somehow ?? .

    Don’t forget to mark the topic as resolved to keep the forums clean and tidy!

    Best regards,
    Konstantinos

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Changed Permalinks and now I can’t login’ is closed to new replies.