Wordpress is fantastic, except when it isn’t.
You can end up with a confusing setup and a broken site if you don’t go by the book! The easiest way to take precautions for a successful migration is to read a 100 line manual, or may lie in finding a “good plugin” that can migrate the site for you.
But again, who cares. Real humans don’t read manuals. They spend sleepless nights debugging a non-existing problem instead.
By being here, you have proven fit to be a human - be proud. You probably have also seen one or more of these beautiful errors -
- Home page in the new URL throws a 500 error
<new-url>will just redirect to the old-url
- The wp-admin page in the new URL will redirect to old URL
<new-url>/wp-adminshow a blank page
- It is also most likely that even if you set
define('WP_DEBUG', true)in the
wp-configfile, nothing turns up in the log.
In short: all things that make you fall for Wordpress all over.
There are a million sites that tell you what exactly you need to be doing to resolve the errors. I will just add to the confusion.
Unfortunately though, I am not an expert. I don’t have “one answer” to all these problems - Wordpress can be complex - at least for me.
Do the following to attempt a fix -
.htaccessin the root folder of your new site to
.htaccess1. Try accessing the site again.
Go to PHPMyAdmin > table WP_OPTIONS and change
hometo the new-url. Retry access.
WP-CONTENT > pluginsfolder to
plugin1(any name other than its current name will work). Repeat access checks.
Edit the file
wp-config.phpand add the following lines at the end.
define('WP_HOME', 'http://' . $_SERVER['SERVER_NAME']); define('WP_SITEURL', WP_HOME . '/');
Clear history, cookies etc. before you retry logging into the
Once you get access -
first: go to Settings > General, and change Wordpress Address and Site Address URLs. Note that you may be logged out if you change the address (even changing to https from http)
next: go to Settings > Permalinks. Change existing value to any new value, and change it back. Or, change to any value that you like.
If none of the steps help, try resetting Wordpress core by keeping rest of the things as-is. You can import a fresh copy of Wordpress by uploading the zip file to your host. The alternative of course is the carpet bomb fix define below.
Final ‘carpet bomb’ fix
The above steps did not help? Well, you need to gulp a pot of coffee, and install fresh version of Wordpress.
Export content, theme, database & everything from the
<old-url> using ‘All-in-one WP Migration’. Import the same plugin in the
<new-url>, and import the file that you exported previously.
Just remember to login using the old-url id/password in the new URL.
Final final action
Even the final fix did not finally fix things for you? It is time to get started on / practice Vipassana - observe that darn breadth. Take a break from work, meditate, and come back after six months. I can guarantee that it would have either fixed itself, or you don’t view the problem as that which needs fixing.