Support » Fixing WordPress » Upgrading WP 3.7.31 site & PHP 7.2

  • wyclef

    (@wyclef)


    Hello, I need to upgrade an old site running 3.7.31 on PHP 5.6 to 7.2. I typically deal with these things incrementally so I bumped to 3.8 at 5.6 (no problems), 3.9 at 5.6 (a few problems), 3.9 at 7.2 (site won’t connect to DB). Now, I am doing this localhost using MAMP. Does 3.9 work with PHP 7.2? Or does MAMP need to be configured for 7.2 and WP? My intention had been to move this up the chains if I could weed out some of these minor issues but can’t even seem to get the site to connect to DB. I tried out WP 4.9.10 with 7.2, and had the same problem. How can I troubleshoot this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Joy

    (@joyously)

    No, 3.9 won’t work with PHP 7.2.
    As a guess, I’d say you need to be somewhere around 4.5 or 4.6 to start trying 7.2. (it’s probably listed somewhere, if I knew where to search)

    But the plugins need to be compatible also, not only with WP but with PHP.
    You can use the PHP Compatibility Checker plugin to help with that, but get an older version since the more recent one doesn’t check older PHP versions any more.

    wyclef

    (@wyclef)

    Thank you. That list you are referencing would sure be helpful… searching, but not finding anything.

    autotutorial

    (@autotutorial)

    PHP 5.2.4 from WordPess 3.2 to WordPress 5.1. PHP 5.6.20-7.3 WordPress 5.2 , WordPress 5.3 PHP 5.6.20-7.4.

    if you can use at least PHP 5.2.4 everything works like a charm (of course sometimes the core has code changes, so it’s safe to use a tested plugin for the current wordpress version).

    wyclef

    (@wyclef)

    Being forced to upgrade to 7.2

    Joy

    (@joyously)

    Looking at https://www.php.net/supported-versions.php you can see that PHP 7.1 didn’t release until late 2016, (7.0 is off the edge of the chart) so you can assume that WP wasn’t testing with PHP 7.0 much before 2016.
    The release page shows the dates for each release:
    https://wordpress.org/news/category/releases/
    2016 had WP 4.4, 4.5, and 4.6.

    You can jump from 3.7 to 4.6, but the plugins might not still be compatible. After PHP 7 came out (or slightly before), WP ran test cases against that, but I don’t know when it was fully compatible. The minimum PHP didn’t change to 5.6 until WP 5.2. But PHP 7.2 didn’t come out until late 2017, which would be WP 4.6. You definitely need to check your plugins for compatibility with PHP 7.2 before switching to it. You have to fix them or find replacements.

    autotutorial

    (@autotutorial)

    if you have backups of the files and the database of 3.7.31 access the site do not log out, make sure you set the default theme ( https://github.com/WordPress/WordPress/blob/3.7.31/wp-includes/default-constants.php#L314 if you started from this version, check your local file as a set theme) and obviously have it updated .. disable all plugins or try to update all plugins for the WordPress version 5.3), download at least WordPress 4.9.12 https://wordpress.org/download/releases/ ( the core supports php 7.2 https://wordpress.org/support/wordpress-version/version-4-9/#miscellaneous ) go up http://domain.com//wp-admin/upgrade.php

    @dd32

    (@dd32)

    Core Developer

    Do the Upgrade process in three steps:
    1) Upgrade WordPress & plugins as far as it’ll go with PHP the 5.6, it should go all of the way.
    2) Once WordPress is upgraded, switch to PHP 7.2.
    3) Once PHP is Upgraded, check for WordPress and Plugin updates again.

    Don’t attempt to update PHP before WordPress has maxed out.

    To make it easier upon yourself, you can also switch to the default theme and disable non-essential plugins (or all of them) to help with compatibility issues, re-enabling them after everything is updated.

    You’re almost guaranteed to run into a compatibility problem somewhere, so make sure you’ve got a backup in place.

    3.9 at 7.2 (site won’t connect to DB).

    PHP 7 switched from using the MySQL extension to the MySQLi extension. WordPress 3.9 is the first to include support for that – but my guess is that Mysqli wasn’t enabled in that PHP build. I’d stick with PHP 5.6 until WordPress is much more up to date.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.