• Resolved cestep

    (@cestep)


    I’ve been given an older backup from 2015. Trying to restore it onto a new server (different domain name). When I restore the database, it kills WordPress. I can’t login to admin or see the page. Just gives me the 500 server error message. I’ve tried using the plugin that came with the backup as well as importing the database directly in PHPmyAdmin.

    The backup would have been done on older versions of WP, PHP, and mySQL. Could that be the problem? Do I need to have a matching environment before restoring?

    Any thoughts?

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Anderson

    (@davidanderson)

    The backup would have been done on older versions of WP, PHP, and mySQL. Could that be the problem?

    Very likely… one big possibility is that you’re restoring on PHP 7.0 or later, and have plugins or themes that aren’t compatible with it. (There were plenty of incompatible changes between PHP 5 and PHP 7). So, in effect, you’re not just restoring an old website, but also upgrading it to a different PHP and WP version – all in one go. It’s much better to break that down into stages and only do one thing at a time.

    UpdraftPlus normally wants you about different versions before you restore. Did it not show any messages? Those messages should tell you what versions the backup was made on. (Or you can decompress the database backup and read them out of there manually).

    David

    Thread Starter cestep

    (@cestep)

    Right. I can upload the themes, plugins, and uploads. No problem. It’s only when I restore the db that things go south.

    I’ve done a screencast to show the process of the restore. No warnings about versions. No errors shown during restore. Even shows restoration as a success. But, . . . it isn’t.

    Plugin Author David Anderson

    (@davidanderson)

    So…. it can restore the data, but for some reason, the restored data doesn’t run on your current/new hosting setup. Try turning on WP_DEBUG in your wp-config.php file, and then instead of a blank screen, you’ll hopefully see an error message. If not, then read the PHP and/or Apache error logs on the server.

    If you restore piece-by-piece like that, then when you restore the plugins, nothing has really happened, because they’re all inactive. Only when you restore the database does the database-stored “which plugins are active” setting come in, and turn them all on.

    The absence of a PHP version message suggests you’re actually on the same PHP version as the backup was made on, so that should rule that out. (Wouldn’t hurt to double-check… you can get the current PHP version out of the “Advanced Tools” tab, and the backup version by using 7-zip or anything else suitable to decompress the database backup file, then opening it in a text editor and reading towards the top).

    Plugin Author David Anderson

    (@davidanderson)

    I think we should also consider turning the mention of what WP version the backup comes from into a formal ‘warning’, rather than just mentioning it. As it is, people may not realise the implications (that they’re doing a restore and WP upgrade in a single operation, which can make it hard to know which was the problem if something goes wrong). I’d forgotten it’s just mentioned, and not a formal warning.

    Thread Starter cestep

    (@cestep)

    Interesting. This is what I got from debugging:

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; LayerSlider_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/plugins/LayerSlider/wp/widgets.php on line 6

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; sidebar_generator has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/plugins/multiple_sidebars.php on line 29

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Tabs_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/tabs_widget.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Tweets_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/tweets-widget.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Flickr_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/flickr-widget.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Facebook_Like_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/facebook-like-widget.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Ad_125_125_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/125_125.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Social_Links_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/social_links.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Contact_Info_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/contact_info.php on line 10

    Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Fusion_Recent_Works_Widget has a deprecated constructor in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/widgets/recent-works-widget.php on line 10

    Fatal error: Cannot use “self” when no class scope is active in /home/cesteptcbguy/public_html/dev/dedicatedlandscaping/wp-content/themes/Avada/framework/plugins/importer/importer.php on line 878

    Thread Starter cestep

    (@cestep)

    I’m using PHP 7.1 on my server.

    This is from the backup:
    # WordPress Version: 4.1.1, running on PHP 5.5.9-1ubuntu4.9 (nginx/1.4.6), MySQL 10.1.1

    Plugin Author David Anderson

    (@davidanderson)

    OK – for some reason the PHP warning isn’t showing, but the difference is there. It’s very likely to be a plugin that wasn’t ready for PHP 7 (there were very many of that sort – PHP 7 had numerous incompatible changes), which is causing the white-screen. You should try to re-deploy on PHP 5 of some sort – preferably 5.5, but 5.6 should be OK if you can’t get 5.5, as the compatibility issues between 5.5 and 5.6 were generally few.

    Alternatively, just de-activate all your plugins, by editing the “active_plugins” field in the WP database in the options table (e.g. using phpMyAdmin in your web hosting control panel), replacing it with a:0:{}. Though, of course, it could be your theme too, or an mu-plugin. But plugins is the biggest likelihood.

    David

    Thread Starter cestep

    (@cestep)

    I copied over new LayerSlider version and theme (the two that were giving issues in debug). Fired up. But it did go through a lot of updating of theme and such. Doesn’t look pretty, but the site is there and can be worked with.

    Thanks for you help!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘500 server error after restore’ is closed to new replies.