For most of my 10-year blogging career, the only thing I knew about PHP was that breaking it instantly took my entire site offline, replacing both the front and back ends with a blank white page. I would occasionally add or update PHP code to customize my theme or add new functionality, but for the most part, I tried to stay as far away from it as possible. (And thankfully Peter and Morgan were always there to bail me out when I did mess it up.)
Thankfully, you don’t need to become fluent in PHP to be a successful blogger. But we strongly believe that having a basic understanding of the technical details that impact your site is an important foundation for growing your business. Because it plays such a key role in WordPress (and much of the internet), let’s take a look at PHP and what it does:
What is PHP?
PHP is a server-side programming language. In plain English, it’s used to perform the tasks that make your site run the way it does, before it ever gets to your visitors’ browsers. In other words, PHP makes your site function. In fact, the PHP file found in most WordPress theme packages is even named
Think of it like the electrical wiring in your home. When you flip a light switch, you don’t actually see what’s happening in the walls, but the wiring makes everything work the way you (or your electrician 🙂) want it to.
Does PHP change?
All programming languages change over time. As they change, different features and commands are deprecated, meaning they are phased out slowly and replaced with better alternatives. For example, many HTML attributes (including
size) have been deprecated as best practice has moved toward using CSS for this formatting instead.
PHP is no different, and new major versions are released, on average, every year. Once a new version is released, bugs and security issues are addressed for 2 to 3 years. After that time, a version may still function properly, but it will no longer be supported, which means it won’t be the fastest, and it could even be insecure. The PHP website provides a list of all supported versions, as well as their planned lifecycles.
On the other hand, because PHP runs from your server, the PHP package on your server has to be updated in order to switch from an older version to a new one. This is a manual process, and the exact process looks different depending on your hosting company. For Agathon clients, it only takes 30 seconds to update (seriously, I just timed it!). Keep reading for those instructions. But first…
What happens if I don’t update PHP?
Because PHP versions are only supported for about 3 years, PHP 7.0 has already reached its end of life (EOL), and PHP 7.1 is just a few months away. Unsupported versions can have security vulnerabilities, so it’s important to upgrade to keep your site secure.
In addition, WordPress has announced that the minimum PHP version required to run WordPress is now 5.6, and that’s expected to jump to 7.0 by the end of the year. Beyond that, the improvements to PHP 7.3 could mean a significant increase in your site speed.
How do I know which version of PHP my site uses? How do I know if I need to upgrade PHP?
To check the PHP version on your site, log into your WordPress admin dashboard and go to Tools → Site Health → Server → PHP version.
How to upgrade PHP on your server
The process for upgrading PHP varies by host. Agathon clients can find instructions here.
If I have multiple sites on my server, will I need to upgrade each one?
Yes. The PHP version is set for each site, so you’ll need to repeat the process for each one. To do that, select each site one by one from the dropdown menu at the top of the left sidebar.
Can you do this for me?
Updating the PHP version is very straightforward, and we’re confident you can do it easily following the steps above. But if you need help, email us at firstname.lastname@example.org and we’d be happy to help.
Can updating PHP break my site?
Minor updates usually go smoothly without any noticeable difference on your site other than better site performance. There are rare instances where the newer version could cause problems; those are less likely if your plugins and WordPress version are up to date before you make the switch.
However, major upgrades can break your site in small (or in some cases, large) ways.
The good news is if you see something wonky after updating, you can simply revert back to the older version of PHP while you make plans for fixing that feature. (As always, feel free to contact client support if you need help!)
How will I know when the next version of PHP is released?
Our team has been hard at work creating a notification process for clients that will provide specific details on your current version of PHP and whether you need to update. Starting this week, we’ll be sending out emails letting you know when a new version of PHP is available on your server so you can be sure your site is using the latest stable version.
PHP may not be something you need to think about often, but hopefully this primer gives you a basic understanding of what it does and why those updates matter!