1

I'm migrating a site from my server to a client's Bluehost (ugh) account. I've tried using

  • All In One WP Migrate
  • BackupBuddy
  • manual migration (copying files & exporting a db using WP Migrate DB)

These are the stats on my server:

Apache Version  2.2.24
PHP Version 5.3.26
MySQL Version   5.6.28-76.1

And the client's server:

Apache  2.2.31
PHP 5.2.17
MySQL   5.5.42

I did set the php.ini on the client server to update to php 5.4. I presume (maybe incorrectly) that the difference in MySQL version shouldn't matter.

Every time I'm getting an HTTP 500 Error (though after the last attempt it's an Internal Server 500 on the home page & the HTTP 500 Error everywhere else).

I renamed the .htaccess - no dice. Removed the php.ini - no dice. The database prefix is different, and I set wp-config to use the extension from the dev site.

Usually these migrations are pretty easy so I'm stumped. What am I missing?

3

You need to turn WP_DEBUG on in your wp-config.php:

define( 'WP_DEBUG', true );

That'll help a lot with working out where that 500 error is coming from. Based on the PHP versions you've mentioned, I'm 99.999% sure that the error is due to a feature that isn't available in PHP 5.2.17. You're probably looking at either shorthand array notation (eg. $array = []; - although this was added in PHP 5.4.0 so probably isn't the problem in your case, given you're coming from 5.3.26), or one of anonymous functions, Namespaces or array_replace, which were all added in PHP 5.3.0.

Having WP_DEBUG on will point you to where that error is being caused. If you've written the code yourself you could replace it with an older alternative (eg. longer array notation, or a non-anonymous function), or if it's possible on the server you're on you could upgrade the PHP version.

As an example, to replace an anonymous function, you'd want to change something like this:

add_filter( 'the_content', function($content){ return 'hello'; });

to this:

add_filter( 'the_content', 'my_content_function');

function my_content_function($content){ return 'hello'; }

Other things worth trying include:

  • Commenting out lines in your .htaccess (add # to the start of the line) that aren't between the # START WordPress and # END WordPress lines
  • Resetting your file permissions
  • The usual disabling all plugins - and changing themes - to see if the problem goes away (if you can't access the admin, you can just rename the individual plugin or theme folders to disable them)
  • The front page is still showing a 500 internal server error. /wp-login.php etc are now showing: Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home2/distriw0/public_html/wp-content/plugins/shortpixel-image-optimiser/wp-shortpixel.php on line 1659 Fatal error: Call to undefined function array_replace() in /home2/distriw0/public_html/wp-content/plugins/query-wrangler/includes/class-qw-settings.php on line 28' – Arp Laszlo Jun 29 '16 at 0:39
  • OK - I've made some progress. After setting the php to 5.4, I was able to login to the backend. The front end is still a 500 Internal Server Error. – Arp Laszlo Jun 29 '16 at 0:44
  • It's not the theme or plugins - I switched to the default WP theme and renamed the plugin folder, still had a 500 error on the front end. The errors from the 2 plugins are gone & I'm able to login to /wp-admin no problem. – Arp Laszlo Jun 29 '16 at 0:59
  • I tried reinstalling 4.5.3 from /wp-admin as well. – Arp Laszlo Jun 29 '16 at 1:01
  • I got the site working after 1) changing php to 5.4 and 2) resetting the file permissions on all files & folders. Oddly, the site still looked a little different than the dev site, I may have missed reactivating a plugin or two. – Arp Laszlo Jun 29 '16 at 15:31
0

The absolute best way to migrate is:

  1. get access to your mysql server
  2. make a dump of the database
  3. get access to your file server
  4. zip your /wp-content folder
  5. upload your zip and sql files to the new server
  6. uncompress the /wp-content file
  7. load the old dump into your new database server
  8. modify your wp-config.php and point to the new database server

source: my own experience throught a large list of websites.

PS and important: don't dump through a WP plugin!!

-1

Try using the plugin called Duplicator https://wordpress.org/plugins/duplicator/

I always it to migrate website. You should not face any problems with this one

As for the errors you are facing there might be additional files that blue host might keep. Do check for any unwanted files or folders

  • I got the site working after 1) changing php to 5.4 and 2) resetting the file permissions on all files & folders. Oddly, the site still looked a little different than the dev site, I may have missed reactivating a plugin or two. – Arp Laszlo Jun 29 '16 at 15:30
  • Please, do not post link only parts – even if it answers the question. As soon as a link is dead, your answer is worthless. – kaiser Jun 29 '16 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.