Stumped on migration

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)