Preparing for MySQL 8.0 and PHP 8 Upgrades: A WordPress Guide

MySQL 8.0 and PHP 8 are both major releases that offer a number of performance and security improvements over their earlier-version counterparts. However, they also introduce some changes that can break existing websites and applications. If you are hosted on WP Engine (or a similar hosting provider), you should already be prepared and have taken some steps to prepare for these upgrades. If you haven’t been proactive, this article is for you.

MySQL 8.0 Update

The biggest threat right now is the MySQL update. As of July 2022, only 11.4% of WordPress sites are currently using MySQL 8 or higher. Older MySQL databases are rapidly reaching the end of thier life and will stop becoming an option for many CMS uses as some hosting companies (like WP Engine) have an upgrade deadline set for October 31st, 2023.
Here’s what you need to know to prepare for the changes without interrupting your website’s uptime.

What Is MySQL 8.0?

MySQL 8.0 is the lowest stable release as of November 1, 2023. It includes a number of new features and enhancements, such as:
  • Improved performance and scalability
  • Enhanced security features
  • New data types and functions
  • Support for JSON and XML documents
MySQL 8.0 also introduces some changes that can break existing websites and applications. For example, it requires that all tables be defined with explicit character sets and collations. It also removes support for some older features, such as the MyISAM storage engine.

Why Is MySQL 8.0 Better?

One of the most important reasons to upgrade to MySQL 8.0 is that it offers improved performance and scalability. MySQL 8.0 can handle more concurrent users and transactions than previous versions of MySQL, making it ideal for businesses with high-traffic websites or applications. MySQL 8.0 also offers a number of new security features, such as encrypted data tables and role-based access control. These features can help businesses protect their data from unauthorized access and use. In addition, MySQL 8.0 includes a number of new features that can help businesses improve the efficiency and manageability of their databases. For example, MySQL 8.0 includes a new performance schema that provides real-time insights into database performance. This information can be used to identify and troubleshoot performance bottlenecks.

Why Is This Important for Businesses?

Databases are essential for many businesses, as they store data that is critical to the operation of their websites and applications. By upgrading to MySQL 8.0, businesses can improve the performance, security, and manageability of their databases. This can lead to a number of benefits, such as increased website traffic, improved customer satisfaction, and reduced costs. According to WordPress.org stats, 33.4% of WordPress sites still use 5.7, and only 11.4% of web sites have made the jump to MySQL 8.0 or higher. This could leave a vast majority of websites with severe maintenance and potential upgrade errors in the near future, leading to broken websites across the Internet.

PHP 8 Update

PHP 8 was released in November 2020. This version includes a number of new features and enhancements, such as:
  • Improved Performance & Scalability: A study by Kinsta found that upgrading from PHP 7.4 to PHP 8 can improve WordPress performance by up to 30 percent.
  • New Language Features: These new language features include union types, named arguments, and match expressions.
  • Enhanced Security Features: PHP 8 includes a number of new security features that can help to protect your website from attack. For example, the new read-only property can be used to prevent accidental changes to data.
  • More Concise & Readable Code: With PHP 8, union types can be used to simplify type checking, and named arguments can be used to make your code more self-explanatory.
  • Easier Compatibility with WordPress Themes & Plugins: Most WordPress themes and plugins are now compatible with PHP 8. This means that upgrading to PHP 8 will make it easier to keep your WordPress site up-to-date and secure.
  • Support for New Data Types & Functions: PHP 8 requires that all tables be defined with explicit character sets and collations. Also, it removes support for some older features, such as the MyISAM storage engine.
However, PHP 8 also introduces some changes that can break existing websites and applications. For example, it requires that all function parameters be declared with explicit types. It also removes support for some older features, such as the old heredoc syntax.

Why Is PHP 8 Important for Businesses?

Currently, about 76 percent of all websites run on WordPress, and of those sites, it’s estimated that only 31.7 percent are running PHP Versions 8 or higher. This means that as older versions become unavailable on managed WordPress hosting servers, the number of sites that could potentially break is over 60 percent. Being proactive vs. reactive is critical in this scenario. Once rolling the server’s PHP version back is no longer an option with your hosting plan, the ability to recover your website becomes much harder and more time-consuming for developers to fix.

Preparing for the Upgrades

Here are some steps you can take to prepare for the MySQL 8.0 and PHP 8 upgrades on WP Engine:
  1. Check Your Compatibility: Use the WP Engine Compatibility Checker tool to see if your website is compatible with PHP 8. If it is not, you will need to make some changes.
  2. Back-Up Your Website: Always back up your website before making any major changes.
  3. Upgrade Your Database: WP Engine will automatically upgrade your database to MySQL 8.0 on the release date.
  4. Upgrade Your PHP Version: WP Engine will upgrade your PHP version to PHP 8 in December 2024. However, you can also upgrade it manually beforehand.
  5. Test Your Website: Once you have upgraded your database and PHP version, be sure to test your website thoroughly to make sure everything is working as expected.

Additional Resources

Here are some additional resources that you may find helpful:

Recent Posts

Sign Up For Newsletters