Podcast Episode

Updating PHP for Our WordPress Sites

Announcements

Is there a plugin for that?

With more than 50,000 plugins in the WordPress repository, it’s hard to find the perfect one. Each week, I will highlight an interesting plugin from the repository.

For more great plugins, download my 50 Most Useful Plugins eBook.

Zapier for WordPress is a plugin that will help you with your automation. The plugin is a bit old and outdated, but you can use Zapier without needing the plugin.

A few ways that I use Zapier:

  • When a purchase of a particular product is made, add all the purchaser’s details to a Google Sheet
  • When a membership is purchased, send the details to Well World and create them an account (which triggers a new email)
  • When someone registers for a webinar add them to ConvertKit
  • When someone fills out a form, create a task in Asana with a link to the Google Sheets answer to the form

Updating our PHP Versions

In this episode, we focus on PHP 8.0 and its differences with previous versions. PHP is a high-level programming language that WordPress uses for web and application development. The episode talks about how to transition from older versions of PHP to the newer versions, the differences between each version, and the things that may break when you update a plugin or theme. The episode also stresses the importance of testing before updating and checking for compatibility issues.

Topics covered in the episode:

  • Introduction to PHP 8.0
  • Overview of PHP as a scripting language
  • Upgrading to newer versions of PHP
  • Testing the update on a clone site
  • Common compatibility issues when updating
  • Reaching out to developers for fixes
  • Conversations about PHP 7.4 end-of-life
  • Differences between PHP versions

Thank You!

Thank you to those who use my affiliate links. As you know I make a small commission when someone uses my link and I want to say thank you to the following people. For all my recommended resources, go to my Resources Page

Full Transcript

Business Transcription is provided by GMR Transcription.

**Dustin:** [00:00:00] On today's episode, we are going to talk about upgrading our PHP version and why it's important that we do it for our WordPress sites here in 2022. Right here on your website Engineer podcast, episode number 529.

Hello, and welcome to another episode of your website engineer podcast. My name is Dustin Hartzler. I'm excited to be here with you today because we've got some work to do. We've got to make sure that we are using the latest version of P H P on our sites. We're gonna talk about why it's important and what we need to do in order to get our sites up to the latest version.

Let's go ahead and dive into a couple announcements. I've got a plugin to share, and then let's see. Talk about PHP. Probably kind of a boring subject, but it is an important subject that we do need to cover.

The first announcement that I wanna share with you today is a very timely announcement, but Yoast has announced that their plugin, Yoast SEO, will drop support for PHP 5.6, 7.0 and 7.1. This is the, their version 20.5. And it may sound [00:01:00] pretty extreme, like, oh no, like these old versions of PHP, if you're running it, it's going to the.

It's not gonna work it. They're not gonna provide support for it. But there is a figure, there is a website that you can go to to see the PHP version stats of WordPress websites, and right now it looks like 89.9% are running a PHP 7.2 or higher. While that's good and we'll talk a little bit about what version we should be on, it is something to be in.

It's important to know that there are a lot of vulnerabilities. There's no more critical updates to some of these older versions, and so if you are using Yoast, you wanna make sure that you're using at least PHP 7.2. Otherwise, that plugin is not going to work. The other announcement that I wanna share with you today is a cool article from WP Tavern about developers who are starting to experiment with Gutenberg native AI block and content assistance.

It's kind of hard to go over in any audio form, but I'll link in the show notes. You can find it, your website engineer.com/ 5 29, and it has a little video from Joe Hoyle, who is [00:02:00] one of the people that is working on this. And it's a, a Twitter link with a video in there, and it's just really, really cool.

And what the demonstration shows is like you're basically using chat g p T to ask questions, and then it fills in the information. So for example, in this instance, he's asking all about these different spacecraft, and then he says, okay, like, Take this data once it appears in a site, and then it says, okay, put it in a column, or put 'em in tables, and then from the tables, then organ them by the year that they were launched and things like that.

It's really, really cool. I highly recommend checking it out just to kind of see what the future could hold. Can you imagine building a WordPress for a site and you're just like, you're just typing, like, I want a table with three columns and it listed alphabetically, and then go out and grab the states and, and list those alphabetically or list those by the date that they were founded or things like that.

I mean, just mind blowing things. The things that we can do in AI, in the in the future is going to be really, really cool. So head on over to the show notes, your website, engineer.com/ 5 29 and you can see some of this cool stuff that is happening. Kind of wish it was here now, but [00:03:00] there's some more development work to get going.

Alright, let's move on into the plugin section. And today is kind of a, I guess I'm gonna call it a lame plugin, but is one that I've been working with, or a service that I've been using with this quote unquote lame plugin. And I just want to kind of highlight and share some of the features that I'm using it for.

So I am gonna today highlight Zapier for WordPress. It is a plugin, it's made by the Zapier team. And it is a plugin. It is outdated, so I don't recommend necessarily going to installing it, but you can do pretty much everything that you need with Zapier and your WordPress site without having this plugin.

I, I don't actually use a plugin. I use Zapier for a bunch of things, But Zapier is a really cool platform that allows you to, to automate your work and, automate the things that you do on a regular basis.

And you can get started. Zapier, they do have several different pricing tiers. The first one is a free tier that you can get up to hundred task per month. So it can do a hundred things, but you can only have five zaps. And I'll talk, talk to you about some of these zaps that I have, and then it kind of goes up from there.

They have a starter package for 20 bucks a month, [00:04:00] $49, and it goes up from there. But like I said, they, here's a few of the ways that I use Zapier with my WordPress site, and again, I'm helping my wife run her business and do some of the things that she needs. So the, the first one is when a purchase of a particular product is made inside a Woo Commerce, I can add all the purchasers details to a Google sheet.

We've teamed up with another outside company that is running a conference and they wanna know every time a ticket is purchased and I could pull in all the information. I can pull in their name and their address and how much they paid and what coupon cone they used and what the discount was, their phone number, like all of those details.

I can do that with Zapier so I don't have to run a report every Friday. So they get the information they need. I can just say, here's the link. Go look at it whenever, and it's gonna be an updated list. That's super cool. Let's see what else. I have one that is, when a membership is purchased, it sends details to Well World, which is like a third party system that my wife uses to sell programs and to, to do, let's see, what else does she do through there that also purchase supplements? It has an app [00:05:00] involved and, and whatnot. So every time that somebody purchases on our WooCommerce site, it talks to Well World and sends the details of the email address and the name of the person, and then adds 'em to a specific program.

And then by doing that, that triggers all kinds of welcome emails and stuff from the Well World app, which is pretty cool. I also have one that when someone registers for a webinar, that it will automatically add them to convert kit. So this is important too, like if you're wanting to do run a free webinar and you're running ads for it and you want people to come into your newsletter and you wanna be able to, you know, talk to them later or send them messages.

Like, you don't want to have to like manually export everything and then import it in, like just tag 'em and, and it works. And then the last one that I have that's kind of a another unique situation is like, my wife has different contractors when they sign up to buy a product, then there are certain things that I need to do to make sure that they get on the website as as a provider on the website.

And what I'm looking at is I'm looking at a Google Sheets page, and when a new row gets added to the Google sheet, then I add a task to Asana, and then I can assign it to myself, [00:06:00] and then I can set a due date of five days from now, and then I can get that done. And so it's kind of a cool way so I don't have to go be checking all the time or she doesn't have to say, oh, so and so signed up.

And then we're waiting for the person to fill out the form, like just look at the sheet and and then send it straight to Asana. So, I mean, there's literally millions of things that you could, you could do and automate your work. And so I'm sure that I'll bring more of those up as I'm continuing to do it.

We do pay for the starter plan, which you can have up to 20 zaps, so 20 different things and you can do up to 750 tasks per month. And basically a task is like a zap. So if I set up this, when somebody fills out a form creating Asana task, like every time that form gets updated, that is one record or that is one Zap.

And so that's how it works. So the plugin of the week is Zapier for WordPress, but don't install it. Just use Zapier with WordPress or with WooCommerce or any of the other services that are out there that integrate between the two. It's like a coding platform that you don't need to code, and different apps can talk to different places, and it is super, super cool.

All right, today, let's talk about. [00:07:00] PHP 8.0, that is going to be what we're kind of focusing on. A lot of times it's like, oh, well 7.4 is no longer an end date. Like, and again, PHP maybe I should explain that. PHP, the numbering scheme is, is kind of weird. So we talked about like the Yoast plugin earlier drop support for 5.6. So 5.6. Is the last version in the five series, and then there's no 6.0 at all. They skip right to seven, and then there's 7.0, 7.1, 7.2 7.3. 7.4 and then it goes to eight, 8.1 and 8.2. So the number rings a little bit, um, kind of on the wonky side, but we want to talk today about getting into PHP 8.1.

Now, PHP 8.1 is not even the latest version. Like if we talk about 8.1. That was released two years and four months ago in November of 2020. 7.4 was in November of 2019. And so 7.4 is over three years old, and it no longer actively [00:08:00] supported, no longer has security support, so we want to at least be talking about getting to 8.0.

8.0 only has seven more months of security support. And so it's like, okay, well what else is out there? So 8.1 was released in 2021, and then 8.2 was released in December of 2022, which was just four months ago. And so eventually we want to get. To 8.0, but there's a big jump when we get to between 7.4 and 8.0.

So let's look at some of those things and some of those differences. Basically PHP it stands for hypertext pre-processor, and it is an open source scripting language that WordPress uses for web and application development. The high level programming language is easy to learn and so it's kind of a preferred platform.

It's what WordPress has been running on for years, but it's still like complex enough to do some really cool things and what professional programmers can use. So, It's kind of like kind of an overview of what PHP is. That's the dynamic part of WordPress, and so that's [00:09:00] how WordPress is able to go and grab information from the database to display your post or display your page title, or like any information that you've saved, it's all being brought back via, via PHP.

Now, that gets a little bit different when we're talking about full site themes, which we talked about a little bit on the last episode and whatnot. But, um, P H P is like the driving factor. It is the code that makes WordPress what it is.

In a perfect world, we'd wanna just be able to go into our host and say, okay, yes, let's go from PHP 7.4 to PHP eight. And in most cases, this is just a, a simple toggle or it is a dropdown menu. I know on Pressable where I host most of my websites, I can go in and it says, basically, PHP version, it gives me a big error that I'm, one of my websites is on 7.4 and it says it will soon be discontinued, please update to eight or 8.1. And to then it says, to check compatibility with your site.

We recommend testing this update on a clone first. So a lot of these hosts and I, I checked around a [00:10:00] few of the different ones. Cloud ways. I know that some of them, the. The other ones like Flywheel and WP Engine and stuff, like you can go in and you can create a clone of that site and it doesn't cost anything because you are not using it as a live site.

It's a test environment. And then you can go and you can change it to a different version of PHP. In general, most things are gonna work, but you could get some weird errors in the fact that maybe a plugin hasn't been updated for years and it's using an old, Kind of, they call 'em function. Maybe it's an old function that's no longer available.

No longer needed. And it's only something that was in the the PHP five era. And they've changed it to do like a different name or does something differently in PHP eight. And so what you could do is once you test that plugin and you're getting an error message of some kind or something doesn't work, then what I recommend you do is just reach out to that theme or that plugin developer and see what is going on.

Like can you say like, oh, hey, I just tested on 8.0. It's not working. Can we get a fix? Like, here's the error that I'm seeing, like you could reach out to them.

On the developer side of WordPress. There's been a lot of conversations about [00:11:00] this all of last year. You know, because we're getting to the end of life of PHP 7.4. It was really pushed hard, like, make sure your plugins work with this latest version. Make sure your theme works. So the latest version, make sure this, make sure that, but that doesn't, that doesn't necessarily mean that your site is gonna perfectly work because if you had custom work done or there's special functions in your functions dot PHP file, or your custom plugin plugins folder, like those types of things might not work and there could be some error messages.

So that is kind of what we're looking for when we're updating it.

Personally, I think if you're gonna make the jump to 8.0, you might as well go all the way to 8.2 because that's what's out and what's available. And it's an easy thing that you can actually switch back and forth pretty simply within your environment inside of your host. Like with Pressable, like if I go to 8.2 and there's some sort of issue, I can go back to 7.4 pretty regularly as of right now. Pretty soon when they get to the point where they're like, we're not gonna allow any new sites on 7.4, or we're gonna discontinue it completely, like you want to be able to one that's making that decision and doing that out of the [00:12:00] control of yourself.

Right? You don't want them to say like, oh, today we are going to remove all 7.4, all sites are gonna be updated. Now, all of a sudden, like you could be in a pinch because something could break and your livelihood, your website could go completely down. So this is why it's a good time. Now, we are actually four or five months too late, from this episode to, to say we're, we're ready to do it bef.

For the end of life of 7.4. But the, the action item, the to-do list item, the thing that we need to do this week is go in, create a clone of our site, and then check it on an updated version of 8.0, 8.1, 8.2. It's kind of a dealer's choice there. Now, most of the things. You won't see anything at all there.

You also have to go in and you have to enable the debugging in order to see what kind of messages. A lot of times you'll get when you update to these new versions, there'll just be a lot of notices, like, oh, by the way, this is no longer the way to do it. Here is the proper way, and there'll be error messages that are just warnings, which don't affect anything. It's just basically saying before the next [00:13:00] version, you need to get this fixed. And like seeing those types of things and reaching out to developers or, or the people that wrote the plugins or the themes, like that's gonna give them kind of a head start of like, oh, I need to fix this.

I need 'em, create these updates and I'm ready to go. I think if you have any of the top, you know, 2000 plugins that are in the WordPress repository, you know, the woo commerce, the, the jet pack, what else are out there? Pretty links, a lot of the plug-ins at Yost, like all of these ones, they are ready already because it is their full-time job in, in the company's full-time job to make sure that these platforms are ready.

And it would be a very, a poor example for some of these high name plug-ins. That are free and on the WordPress repository to not support the correct version of PHP when PHP 7.4 is at end of life. So that's kind of what I wanna talk about today. There's just a, a small action item that you want to go in.

You want to clone your site inside of your host, whether it be, you know, cloud waves or WP n g or wherever. Clone it and then switch to the new version and just see if any error messages pop up. That's pretty much all you need to do. [00:14:00] If there's no like fatal errors, if you don't get that weird, like your website can't load because there's an issue, like your site is going to be okay with a new version.

If you run into one of those fatal errors, like, Hey, you need to, your WordPress site can't load, then the easiest thing to do is to reach out to your host and say, Hey, I have a fatal error. Can you help me figure out what that fatal error says and where the problem is, if there's a fatal error, it's going to highlight which plugin is actually the culprit and which one is causing the issue, and then that one can be reinstalled and see if there's.

If that solves the problem or whatnot. So that's kind of the action items. Those are the steps this week. Make sure that we're, at least by the time we talk in a week or so that you are working with PHP 8.0. I'll take this as a, I need to do it as well, and I will make sure that all of my sites are updated to the latest version.

And that way we're just kind of like spring cleaning. We're getting ready. We don't have to worry about some big a malicious attack on 7.4 that could take our websites down someday, but we are running 8.0, 8.1 or 8.2. That's all I've got to share with you this week. Take care and we'll talk again [00:15:00] soon.

Bye-bye. For more great WordPress information, head on over to your website engineer.com.