PhP 8.2 and You

Has your web team told you that you need to update to PhP 8.2? If so, you might have responded with, “What, now?”

Let’s explore this announcement a little more closely.

What is PhP?

PhP is a computer language, a language used by computers and by people wanting to communicate with computers. It is the foundation of WordPress, Joomla, and Drupal. It gets updated regularly, like all current computer languages. The most recent update is 8.2.

PhP.net says that “PHP 8.2 is a major update of the PHP language. It contains many new features, including readonly classes, null, false, and true as stand-alone types, deprecated dynamic properties, performance improvements and more.”

This may all be true, but it probably doesn’t answer your questions about PhP if you are wondering how the update will affect your website.

How will the update affect my website?

Before November 2023 you will need to upgrade your WordPress website to PhP 8.2. If you have a webmaster, they will probably do this for you. That might be good…but it might be a problem.

If you Google general questions about what will happen when you do this, you will find assurances that there is very little chance that it will break your website. We tested all the websites we host and found that three of them break with that update. That is, instead of seeing your website, visitors to your web address will see a message saying, “There has been a critical error on this website.”

If you’ve been Googling information on this, you might also have seen that WordPress has announced compatibility with PhP 8.2. If you are using a current version of WordPress (and you should be), then you will be glad to know that WordPress itself is compatible with PhP 8.2, and WordPress will not break.

Does that mean you can relax?

Not necessarily.

You may have a WordPress site which uses WordPress software. But your website also uses a theme and probably some plugins, too. Themes and plugins are the source of plenty of compatibility issues.

Compatibility Issues in WordPress

If you get a critical error that breaks your website, it could be caused by your theme or one or more of your plugins. They may have been fine until you updated your PhP version, but bringing that change into the mix could reveal some hitherto unseen incompatibility.

You might be able to fix this problem by changing your theme and getting rid of the plugin or plugins that are causing the problem.

That sounds easy, doesn’t it?

It’s not as easy as it sounds

One of the many great things about WordPress is that — unless you are using a site builder that destroys your content if you change the theme — you can change your theme without losing the content.

However, you will lose the design. You will lose your customizations. You will lose the configuration. Your site will not work the way it did before. It may not work at all. You might not even be able to get into the admin section to change the theme.

If you have a very simple theme with no real customization, you might be able simply to change your theme to another very simple theme and be fine. It will be different, but change can be good.

In fact, if your theme breaks, it is probably time to update your website design anyway. If testing shows that PhP 8.2 will break your website, the best plan may be to budget for a new website design before November.

As for plugins, some can be changed easily. If you’ve been using one SEO plugin and now you have to change to another, you will just get a chance to learn something new.

On the other hand, if you have to switch out a forms plugin that collects and stores your data in a database you’ve been relying on, and which contains 45 forms that took you five hours apiece to build, you will not be happy.

What should you do?

First, find out if you have a problem. Ask your webmaster or your web host to help you test your site with PhP 8.2. There are plugins that can do this, too, if you don’t have anyone to help you.

If your site breaks during the test, you can clear your cache and it will go back to where it was. At that point, you can do some troubleshooting. Deactivate all your plugins and test again. If it still breaks, the problem is your theme.

If you have a custom theme, you could contact your original developer and ask to have the code updated. However, the lifespan of a website is really just three to five years. After that, you should consider updating entirely. It is possible that there are just a few lines of code that need changing, but it could also cost as much to fix the theme as to have a new one. Give it some thought.

If the site doesn’t break at this point, activate your plugins one at a time until the site breaks. The last plugin you activated is your problem (or one of your problems).

Can you get rid of that plugin or replace it with something else? Give it a go. If it is very important to your website or your business, contact the developer and ask them to update it so that it will be compatible with 8.2.

If that doesn’t work, begin the process of finding a replacement and rebuilding whatever that plugin has been doing for you.

You can see why it is a good idea to start this process as soon as possible. All these steps will take time.


Posted

in

by

Tags:

Comments

Leave a Reply