I’ve built and uploaded three WordPress based websites this week, so at the moment I’m pretty ‘well-schooled’ in how to migrate from a local to live server.
I had a curious error with the third.
Somehow, it just wouldn’t display after uploading. Here’s my usual workflow:
- Upload Files to Server
- Export SQL Database
- Import SQL Database to New Location
- Update the wp-config.php file to include my new database credentials
- Log into the new SQL Database and adjust the home and site_url records in the wp-options table
This process has served me quite well, but not in this particular case.
Just to ensure I hadn’t missed a step, I wiped and completed them all a second time. Still getting a 500 error.
I had not set up permalinks yet, so there was no .htaccess file to contend with (a common cause), and I can ensure the settings described above were perfect.
I was stumped.
In the wp-config.php file, I’ll found the WP_DEBUG setting set to false.
I set this to true and added a couple of values of my own:
/* And at the very bottom of the file */
When I next refreshed the page, it told me exactly where to look for my error.
My error was caused by a custom class I downloaded not being compatible with the live-server’s version of PHP. It was a simple fix, which I implemented quickly.
It’s error report was a lot more informative than simple ’500′
Took me a while to find this solution though. Time wasted!
Powered by Facebook Comments