Support » Installing WordPress » WordPress and PHP 7.1

  • Resolved atom8bit

    (@atom8bit)


    Is WordPress compatible with PHP 7.1 yet? I can only find information on PHP 7.0, so I’m assuming not, but if anyone has additional insight, please let me know.

Viewing 15 replies - 1 through 15 (of 18 total)
  • Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    It’s not official but WordPress by itself should should just work with PHP 7.1.

    Specific plugins and themes may need updating.

    Thanks. I’ll test, then.
    When it is official, is there usually an announcement? I do remember something for php 7.0.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    There won’t be an official announcement exactly. The requirements page works in the opposite direction and details the minimum requirements.

    https://wordpress.org/about/requirements/

    The first part is about suggested versions. But even though it’s a really bad idea, WordPress will run on PHP as old as 5.2.4. Old versions of PHP have some reall issues but the core WordPress will work.

    Thanks. And yeah, I won’t be running PHP that old…

    Thanks for the community heads up, anyways big hosters are in beta with PHP 7 still in EU.

    And yes there is ALWAYS an annoucement, don’t worry there is time before everyone goes to PHP7 and MySQL 5/6 🙂

    • This reply was modified 2 years, 8 months ago by  Digico Paris.

    Hai

    I am facing problem of order total in dashboard. I have wrote custom API to generate Label fee for each product , its working but coming to the order total Label was not adding in order total. Give solution for this

    please find below link to understand more clearly https://www.dropbox.com/s/htooxl9igl27e5n/issue.png?dl=0

    Thank You

    That has nothing to do with anything and is completely off-topic.

    FYI to others involved, I did upgrade to php7.1 after this thread and it went well, thank you.

    Hai

    I have updated my PHP version to 7.1 but it is showing Fatal error like this

    Fatal error: Uncaught Error: Call to undefined function mysqli_connect() in C:\xampp\htdocs\campstore\wp-includes\wp-db.php:1570 Stack trace: #0 C:\xampp\htdocs\campstore\wp-includes\wp-db.php(658): wpdb->db_connect() #1 C:\xampp\htdocs\campstore\wp-includes\load.php(404): wpdb->__construct(‘root’, ”, ‘campstore’, ‘localhost’) #2 C:\xampp\htdocs\campstore\wp-settings.php(107): require_wp_db() #3 C:\xampp\htdocs\campstore\wp-config.php(89): require_once(‘C:\\xampp\\htdocs…’) #4 C:\xampp\htdocs\campstore\wp-load.php(37): require_once(‘C:\\xampp\\htdocs…’) #5 C:\xampp\htdocs\campstore\wp-blog-header.php(13): require_once(‘C:\\xampp\\htdocs…’) #6 C:\xampp\htdocs\campstore\index.php(17): require(‘C:\\xampp\\htdocs…’) #7 {main} thrown in C:\xampp\htdocs\campstore\wp-includes\wp-db.php on line 1570

    I have updated php to 7.1 today and everything works fine. I am using the customizr theme with a child theme. I was on php 5.3 as I had not realised I had to do this myself until recently. WordPress, theme and plug ins have always been updated straight away. I am with vidahost and just had to select which version i wanted to use. I did not have to change anything else. I think it seems a bit quicker but that could be wishful thinking

    My hosting has an option to go forward or backward in php versions in the Cpanel. So I am testing 7.1 with WordPress. Actually I quit having some php errors that was showing up with a plugin named Code pinch which corrects any php error for a small fee. And yes as the person above me says it is a bit quicker.

    What’s really weird is my site is now faster with cloudlfare turned off than with it on. Go figure. Trying to find out what’s up with that. But maybe that will save me money of no longer needing it. Or maybe my caching plugin is doing something? I have to do more testing to see what it is.

    Here’s an article on php 7.1
    php 7,0 vs 7.1

    • This reply was modified 2 years, 5 months ago by  ikester7579.
    Sean

    (@saurabh411)

    Hi,

    I am new to wordpress and I found this as a high maintenance task to resolve this issue. Please advise.

    Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php:1570 Stack trace: #0 C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php(658): wpdb->db_connect() #1 C:\Apache24\htdocs\wordpress\wp-includes\load.php(404): wpdb->__construct(‘root’, ‘admin’, ‘wp1’, ‘localhost’) #2 C:\Apache24\htdocs\wordpress\wp-settings.php(107): require_wp_db() #3 C:\Apache24\htdocs\wordpress\wp-config.php(89): require_once(‘C:\\Apache24\\htd…’) #4 C:\Apache24\htdocs\wordpress\wp-load.php(37): require_once(‘C:\\Apache24\\htd…’) #5 C:\Apache24\htdocs\wordpress\wp-blog-header.php(13): require_once(‘C:\\Apache24\\htd…’) #6 C:\Apache24\htdocs\wordpress\index.php(17): require(‘C:\\Apache24\\htd…’) #7 {main} thrown in C:\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 1570

    You should probably open a new ticket about that as it’s off topic.

    Re: mysqli_connect() fatal error.

    On fresh installs of PHP 7.x, the mysqli library will be disabled by default. This will always cause WordPress to fail.

    To fix it, you need to edit /etc/php/7.x/apache2/php.ini configuration file to remove the semicolon in front of this line…

    extension=php_mysqli.dll

    If you do not have control over that file, then I suggest you contact your web hosting provider and ask them to enable the php_mysqli extension.

    Re: mysqli_connect() fatal error.

    If You have cPanel or similar, then you can go into PHP settings (possibly “Advanced”), and tick the PHP modules that get loaded with PHP.
    just put a tick beside mysqli.
    You may be able to remove the tick beside the old mysql module. Test to see.
    You can keep the cPanel window open while you look at a page on your WordPress site.

    Aside there are some useful caching modules if you are interested.

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘WordPress and PHP 7.1’ is closed to new replies.