- This topic has 7 replies, 2 voices, and was last updated 9 years ago by
Tom.
-
AuthorPosts
-
December 3, 2014 at 1:23 pm #51106
Maarten
Help! What happened?
Today I moved my website to the root directory of my website,
all was working fine. But all at once my layout got lost and I cannot acces wp-admin anymore.
Is my database down? How would I be able to reset this?
Great! Good start for my website π
Thanks for the help!December 3, 2014 at 1:24 pm #51107Maarten
PS: my website link is http://www.deheuvel.be
December 3, 2014 at 1:25 pm #51108Tom
Lead DeveloperLead DeveloperHi there,
Before moving your website to the root directory, did you change your Site URL and Home URL in “Settings > General”?
If not, you’ll have to set them either through the database, or like this: http://codex.wordpress.org/Changing_The_Site_URL
Set the Site URL to the new URL (since you switched directories) – and you should be good to go.
Also, you may need to replace URLs within your content to the new URL – I suggest this plugin: https://wordpress.org/plugins/velvet-blues-update-urls/
Hope this helps π
December 3, 2014 at 1:29 pm #51109Maarten
Hey Tom!
Weird thing is I DID all these things! Everything was fine at first but after an hour or so everything got lost? And I didn’t change anything in settings, only thing I was doing was changing my settings in Google Analytics?December 3, 2014 at 1:31 pm #51110Tom
Lead DeveloperLead DeveloperHmm, so when you try to go to your website it’s a 404 error? Or?
December 3, 2014 at 1:34 pm #51111Maarten
Hey Tom!
Weird thing is everything was working correctly for more than one hour! Then I started editing my settings in Google Analytics and everything went wrong? Is it possible my wordpress just cannot acces the database at the moment?December 3, 2014 at 1:42 pm #51116Maarten
Everything fixed π
I know where I went wrong: while changing for the first time I did something wrong and had to undo my actions with following code:<blockquote>If You Have Accidentally Changed your WordPress Site URL Suppose you accidentally changed the URIs where you cannot move the files (but can still access the login page, through a redirection or something). wp-login.php can be used to (re-)set the URIs. Find this line: require( dirname(__FILE__) . '/wp-load.php' ); and insert the following lines below: //FIXME: do comment/remove these hack lines. (once the database is updated) update_option('siteurl', 'http://your.domain.name/the/path' ); update_option('home', 'http://your.domain.name/the/path' );</blockquote>
And I forgot to remove this line π probably after accessing wp-login, it changed directories again. I’m sorry for my hysterical reaction π
December 3, 2014 at 2:06 pm #51128Tom
Lead DeveloperLead DeveloperGlad you fixed it! π
-
AuthorPosts
- You must be logged in to reply to this topic.