Cara menggunakan php version compatibility

Tahukah kamu bahwa sejak 2 Mei 2019, versi PHP saat ini sudah berada di versi 7.3.5. Akan tetapi, penggunaannya dalam dunia web hosting lebih dominan menggunakan versi 7.3 atau di atas 5.6.  Jika kamu ingin melihat data ChangeLog, bisa cek di tautan ini : https://www.php.net/ChangeLog-7.php#7.3.0.

Pada awal bulan Mei 2019 lalu, wordpress telah ditingkatkan ke versi 5.2. Dalam hal ini wordpress menyarankan untuk menggunakan versi PHP terbaru, seperti yang termuat di dalam “Site Health” yang merupakan sub menu dari fitur baru wordpress 5.2.

Sangat disarankan jika kamu masih menggunakan versi wordpress sebelumnya, segera lakukan upgrade ke versi 5.2. Karena ini merupakan pilihan terbaik untuk meningkatkan fitur kemanan yang diberikan wordpress.

Direkomendasikan untuk segera upgrade

Begitu juga dengan hal lainnya, jika kamu masih menggunakan versi PHP 7.3 ke bawah (versi 5 dan 6), sangat direkomendasikan untuk segera melakukan upgrade. Karena ada banyak keuntungan setelah kita melakukan update ke versi 7.3.

Diantaranya yakni dapat meningkatkan performa kecepatan loading situs, perbaikan bug, peningkatan fitur keamanan dari serangan peretas dan sebagainya.

Tunggu apalagi segera upgrade sekarang juga.

Jangan langsung upgrade, perhatikan ini

Sebelum melakukan update php ke versi 7.3 di cPanel, ada beberapa hal yang harus kamu perhatian. Diantaranya:

  • Pastikan server web hosting yang kamu gunakan telah mendukung versi php 7.3
  • Pastikan semua plugin dan thema juga mendukung versi php 7.3. Untuk masalah ini, kamu dapat bertanya ke developer thema dan plugin. Jika kamu menggunakan thema dan plugin dari directory wordpress, coba perhatikan di bagian rincian perubahan. Biasanya di sana ada keterangan compatible dengan versi php di atas 7
  • Sebelum merubah versi php, lakukan backup terlebih dahulu buat jaga jaga, mana tahu terjadi eror setelah perubahan

Kenapa point di atas penting ?

Karena tak semua penyedia web hosting bersedia mengatasi masalah setelah perubahan versi PHP. Saya pernah membaca di salah satu TOS mereka begitu. Maka dari itu, penting sekali melakukan backup sebelum versi PHP hosting di rubah.

Oke, jika sudah dipersiapkan. Ikuti panduannya di bawah ini.

Berikut cara merubah versi PHP di cPanel hosting:

  1. Login ke cPanel hosting
  2. Pilih menu “Select PHP Version”
    Cara menggunakan php version compatibility
  3. Oya sebelum merubahnya, perhatikan setiap module yang ada. Pastikan sama, ingat bro… pastikan sama (jika perlu dan sulit untuk diingat, catat di kertas atau screen shoot aja biar ga ribet). Jika tidak sama, kemungkinan besar akan terjadi eror situs tidak bisa dibuka hanya berisikan kode script, dll.
    Cara menggunakan php version compatibility
    Cara menggunakan php version compatibility

    Gambar di bawah ini adalah contoh ngawur. Jangan di tiru ! berbahaya 😀 Pilih tulisan “Save” dulu di bawah.

  4. Selanjutnya adalah mengganti versi PHP menjadi PHP 7.3. Pilih tulisan “Save” dulu di bawah.
  5. Pilih tulisan “Set as current“
    Cara menggunakan php version compatibility
  6. Pilih simpan
  7. Selesai

Jika kamu menggunakan layanan shared hosting cloud linux, prosesnya sangatlah sederhana. Lainnya jika kamu menggunakan VPS, yang harus menginput kode tertentu. Langkah selanjutnya, cek dasboard wordpress, lihatlah apakah ada masalah ?

Jika terjadi eror setelah proses perubahan versi PHP 5,6,7 ke versi 7.3, jangan panik dulu dan buru – buru ambil tindakan restore. Cobalah kembalikan (downgrade ke versi sebelumnya). Lihat perubahannya. Itulah kenapa saya tekanankan di atas, module yang ditingkatkan harus sama.

Salah satu module yang tidak sama, mungkin saja akan terjadi eror seperti situs tidak dapat diakses hanya berisi tulisan javascript, dll.

As the primary programming language of WordPress, PHP plays a critical role in the security and speed of your website. Therefore, if you’re not running the latest WordPress PHP version, you could be hampering your site’s performance.

The good news is that upgrading to the most recent version isn’t a difficult process. There are several methods you can use depending on your hosting provider, but the steps are relatively quick and straightforward. All it takes is a few small preparation tasks, then you can typically complete it with just a few clicks.

In this post, we’ll briefly introduce you to WordPress and PHP, and discuss why it’s important to update to the latest PHP version. Then we’ll explain how to check your current WordPress PHP version and walk you through how you can upgrade it if necessary. Let’s get started!

📚 Table of contents:

How to update the #PHP version of your #WordPress site 🐘

Click To Tweet

An overview of WordPress and PHP

First released in 1990, PHP is one of the most popular and widely used languages. PHP and WordPress have an important relationship as PHP is the primary programming language that WordPress runs on. This means that if you use WordPress, you also use PHP.

Since WordPress is built using PHP, it affects many of the content management system’s (CMS) features and functionality.

PHP is a server-side scripting language, which means it runs on your hosting server.

Without getting too technical, when a visitor visits your website, your server runs the PHP code and then returns your webpage in HTML, which is what your users see in their browsers. Therefore, if something goes wrong with your PHP, it can affect the way your site appears and functions.

Why it’s important to update WordPress to the latest PHP version

The two main reasons to update to the latest PHP version are for the security and loading times of your WordPress site. Considering that PHP is used by nearly 80% of websites[1] today, it’s often a target for hackers.

Regularly performing WordPress updates for the Core software, as well as your plugins and themes, is an essential part of website maintenance. Doing so can help you avoid security vulnerabilities and protect your data.

In the same vein, it’s critical to update PHP to ensure that your site is running on the latest, fastest, and safest version. This is because every version that is released helps improve performance, reduces memory usages, and overall helps enhance the efficiency of running processes.

There are several versions of PHP that you can use. However, not all of them currently receive active support, including PHP 5.5, 7.0, and 7.1. WordPress requires you to run PHP 7.4 or higher.

For the best results, we recommend upgrading to the newest stable release, which is currently PHP 8.0. At the absolute minimum, you’ll want to make sure you’re still using a PHP version that receives active support and/or security updates, which you can check on this page:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility
PHP support timelines as of September 2021

How to check your current WordPress PHP version

Before you update the PHP version of your WordPress site, it’s a smart idea to check which one you are currently running. Some hosting providers automatically upgrade PHP to the latest version for you, so this may not even be something you need to worry about.

To check your current WordPress PHP version, navigate to your admin dashboard and go to Tools > Site Health:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

In the Site Health dashboard, you will find some details about your website status and information. For example, it offers some recommendations for actions you can take to improve your site’s performance, such as removing inactive themes and plugins.

To locate your WordPress PHP version, click on the Info tab, followed by the Server panel:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

Here, you will find a handful of information about your server, including the PHP version. Depending on which version you’re running, you may or may not want to upgrade.

However, just because WordPress currently supports your current version, doesn’t necessarily mean it’s the best one to be using. As we mentioned, we recommend upgrading to the newest stable release. In the next section, we’ll walk you through how to do that.

How to update the PHP version of your WordPress site

Now that we understand more about the importance of updating your WordPress PHP version, it’s time to take a look at how to go about it. However, before getting started, there are a few tasks we recommend taking care of.

Before getting started

First, it’s important to remember to back up your site. If anything goes wrong in the updating process, you’ll want to have a recent version of your site to restore. For example, occasionally, a plugin may conflict with the newest version of PHP. If that’s the case, you’ll likely want to roll back to your older version until the plugin is updated or you find a replacement.

Next, we recommend making sure that WordPress Core, themes, and plugins are all upgraded to their latest versions as well. This can help prevent compatibility issues. To do so, you can navigate to your WordPress admin dashboard, then click on Updates under Dashboard:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

If there are any available updates, it will tell you on this screen. Once you get these tasks taken care of, you’ll be ready to begin updating to the latest WordPress PHP version. As we mentioned, the process for doing so will depend on your hosting provider. Let’s explore some of the most popular options.

Updating your PHP version in cPanel

If your hosting provider uses cPanel, updating your PHP version should be a quick and easy process. First, log into your hosting control panel.

Next, navigate to the Software section and click on Select PHP Version:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

On the next screen, you will see your website’s current PHP version along the top:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

When you click on the current version, you can choose from a list of all available PHP releases. In this case, the list goes up to 8.0:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

To save your changes, you can select Set as current. Of course, not all hosting providers use cPanel. Many have their own custom dashboards and site tools that will require similar but slightly different steps.

Updating your PHP version using SiteGround’s Site Tools

If you use SiteGround as your hosting provider, the process varies just a bit. To get started, log into your hosting account.

Next, navigate to the Websites tab and click on Site Tools:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

Once you’re logged into your Site Tools area, you’ll want to browse to the Devs section on the left-hand side menu, then click on PHP Manager:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

On the next screen, you can view your current PHP version:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

As you can see, SiteGround has a Managed PHP Service that runs automatic updates. However, they also give you the option to change it manually, which you can do by clicking on the pencil icon to the right of the PHP version:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

If you do wish to do that, you can select Change PHP version manually from the drop-down menu, followed by the version you wish to upgrade to. In this case, both PHP 7.4.23 and PHP 8.0.10 are options. Once you select it, you can click on the Confirm button to save your changes.

Updating your PHP version via MyKinsta

Another popular hosting provider that offers a slightly different method is Kinsta. If you’re a Kinsta user, you likely already know that the host uses its own custom control panel called MyKinsta.

To get started, log into your MyKinsta dashboard and navigate to Sites. Then, click on the name of your live site, followed by the Tools tab:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

Under this panel, you can scroll to the PHP engine tool. As you can see, it will show you your current version of PHP (which is PHP 7.4, in this case).

Next, you can click on Modify. When you do, a dropdown list will appear with the available version that you can update to:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

Once you make a new selection, it will ask you to confirm that you want to change the PHP version. Click on the Modify PHP version to continue:

Cara menggunakan php version compatibility
Cara menggunakan php version compatibility

It may take several minutes for your hosting provider to complete the PHP updating process. Make sure you don’t exit the screen before it’s finished to avoid causing errors.

SiteGround and Kinsta are just two examples of hosting providers that let you update your WordPress PHP version using tools other than cPanel. However, regardless of the host that you’re using, the overall concept and process will largely be the same.

Remember that not all hosting providers offer their users the option to update the PHP version through their control panels. If you can’t find an option to do so through your hosting account, we recommend getting in touch with your provider to ask their requirements/process for doing so.

What to do after you’ve updated your WordPress PHP version

Once you’re done updating your PHP version, there’s not much you have to do. However, we do recommend checking to make sure that everything on your site works properly.

You can visit your website from the front end and look for any obvious issues or errors. If all seems to be functioning as it should, you can move onto the back end of your site.

While it’s not common, there are instances when updating your PHP version could cause your site to break. This is why we recommend safely backing up your site before updating.

However, if this does happen, you’ll want to get to the source of the issue. You can start by deactivating all your plugins and switching to a default theme. Then you can activate your plugins one by one to try to isolate the cause of the problem.

If this doesn’t work, we recommend getting in touch with your hosting provider. In some cases, you may need to downgrade your PHP version back to what it was before it broke your site.

Conclusion

As a website owner, it’s important to make sure that you’re staying on top of your site maintenance in order to provide a fast and secure experience for your users. One of those tasks is performing regular updates, including PHP updates. If you’re running an outdated version of PHP, you could be hurting your site speed and security.

How to update the #PHP version of your #WordPress #website 🐘

Click To Tweet

In this article, we explained that you can easily check your current version of PHP under the Site Health section of your WordPress dashboard. If you need to update PHP, you can do so through your hosting provider. Some hosts offer cPanel or Site Tools that let you upgrade yourself, while others require you to contact them to request an upgrade.

For some other ways to work with WordPress and PHP, you can read our guide on how to add PHP to WordPress.

Do you have any questions about updating your WordPress PHP version? Let us know in the comments section below!

Apakah perlu upgrade versi PHP ke versi terbaru di WordPress?

Alasan Mengapa Harus Update PHP WordPress. Jika Anda masih awam dengan kata PHP maka akan dijelaskan singkat, dimana PHP adalah bahasa pemrogramana dari WordPress. Dimana jika versi PHP meningkat, maka WordPress juga akan berkembang dan jika PHP tidak di update, WordPress tidak akan bisa diakses.

Cara Mengetahui PHP versi berapa?

Caranya ketik domainanda.com/phpinfo. php. Anda akan melihat versi PHP yang digunakan pada website.