0% found this document useful (0 votes)
223 views

WordPress PHP Versions

The document discusses PHP versions that are compatible and recommended for WordPress. It provides information on supported PHP versions and their support periods. It lists the minimum and recommended PHP versions for different WordPress versions. The latest supported PHP version is 8.2, though compatibility with PHP 8.x is still in beta testing. The document also provides instructions for checking the PHP version used by a WordPress installation.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
223 views

WordPress PHP Versions

The document discusses PHP versions that are compatible and recommended for WordPress. It provides information on supported PHP versions and their support periods. It lists the minimum and recommended PHP versions for different WordPress versions. The latest supported PHP version is 8.2, though compatibility with PHP 8.x is still in beta testing. The document also provides instructions for checking the PHP version used by a WordPress installation.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

WordPress PHP Versions: Best PHP for WordPress in 2023

1. Overview
WordPress substantially relies on PHP to work and operate. Updates for both platforms are being
published regularly to fix security loopholes and bring enhancements in usability and performance.
Thus, WordPress users have to continuously update their software and confirm its compatibility with
supported PHP versions.

WordPress PHP versions depend on the compatibility between WordPress and PHP. As each version of
WP requires specific minimum PHP requirements. In this context, this article aims to explore the
compatibility of the multiple versions of WordPress with PHP, in light of continuous updates being
published on a regular basis for both platforms.

2. Supported PHP Versions


Updates of PHP programming language are being published regularly. The updates usually include bug
fixes and security improvements besides other functional and performance enhancements.

When published, each PHP version remains supported for a period of 3 years from its initial stable
release, the support period runs over two main successive phases:

 2-Years Active Support: the support includes fixing BOTH BUGS and SECURITY ISSUES.
 1-Year Security Support: the support includes fixing ONLY CRITICAL SECURITY ISSUES.

Once the support period is completed (after 3 years), the version reaches its end of life (EOL) and
becomes no longer supported. It’s strongly not recommended to use an unsupported version of PHP as
it might expose the application using it to security vulnerabilities and bugs.
3. WordPress Current PHP Versions
The official PHP website maintains a specific webpage to check the status of supported versions.
Accordingly, the currently supported PHP versions that can be safely used for WordPress are:

 PHP Version 7.4 – No Longer Supported


 PHP Version 8.0 (Security Support, ends on 26/11/2023)
 PHP Version 8.1 (Active Support, ends on 25/11/2023)
 PHP Version 8.2 (Active Support, ends on 08/12/2024)
When an older PHP version runs out of support, it is removed from the list and, usually, a new version
with full support is added.

4. WordPress PHP Requirements


In general, WordPress requires specific server requirements, which cover PHP requirements, hosting
details, and other software dependencies.

Technically speaking, each version of WordPress has specific PHP versions that it is compatible with.
That being said, although the software might work on legacy PHP versions that reached their End Of
Life, the platform recommends using only supported PHP versions.

Important: a compatible PHP version is a version that WordPress requires to work


properly, regardless of whether it is still supported or not.

Here is a list of the compatible PHP versions for each version of WordPress, knowing that we only
consider WP versions that can work with the currently supported PHP versions:

WordPress 6.1 PHP version is: 5.6 up to 8.2


WordPress 6.0 PHP version is: 5.6 up to 8.1
WordPress 5.9 PHP version is: 5.6 up to 8.1
WordPress 5.8 PHP version is: 5.6 up to 8.0
WordPress 5.7 PHP version is: 5.6 up to 8.0
WordPress 5.6 PHP version is: 5.6 up to 8.0
For details about PHP requirements for older versions of WordPress, please check this official blog.

5. WordPress Minimum PHP Versions


In terms of PHP requirements, each version of WordPress has a particular minimum PHP version.
However, WordPress recommends always using the minimum supported version of PHP regardless of
the used WordPress installation.

WordPress Minimum PHP Version is: PHP 8.0


WordPress Minimum (UNSUPPORTED) PHP Version is: PHP 5.6.20+ (this version is no longer
supported and may expose your site to critical vulnerabilities)

As WordPress recommends, we highly urge you not to use the minimum version in case it is not
supported, even if it is compatible with your website’s WordPress version.

For this reason, we mention here the minimum PHP requirements for each WordPress installation.
Knowing that we cover only WordPress versions that are compatible with supported PHP versions.

Here is a list of the minimum PHP versions for WordPress:

MINIMUM
WORDPRESS VERSION MINIMUM PHP VERSION (SUPPORTED) PHP
VERSION

WordPress 6.1
PHP 5.6 PHP 8.0
WordPress 6.1.x

WordPress 6.0
PHP 5.6 PHP 8.0
WordPress 6.0.x

WordPress 5.9
PHP 5.6 PHP 8.0
WordPress 5.9.x

WordPress 5.8
PHP 5.6 PHP 8.0
WordPress 5.8.x

WordPress 5.7
PHP 5.6 PHP 8.0
WordPress 5.7.x

WordPress 5.6
PHP 5.6 PHP 8.0
WordPress 5.6.x
6. What Is The Recommended PHP Version For WordPress?
As mentioned earlier, each WordPress installation requires specific PHP requirements. That said, the
best and recommended PHP version for WordPress depends on which version of WordPress is being
used.

WordPress Recommended PHP Version is the latest supported version which is compatible with your
website’s WordPress version.

Here is a list of the recommended PHP version for each WordPress, we only mention WP versions that
are compatible with supported PHP versions:

WORDPRESS VERSION RECOMMENDED PHP VERSION

WordPress 6.1
PHP 8.x*
WordPress 6.1.x

WordPress 6.0
PHP 8.0* | PHP 8.1*
WordPress 6.0.x

WordPress 5.9
PHP 8.0* | PHP 8.1*
WordPress 5.9.x

WordPress 5.8
PHP 8.0*
WordPress 5.8.x

WordPress 5.7
PHP 8.0*
WordPress 5.7.x

WordPress 5.6
PHP 8.0*
WordPress 5.6.x

WordPress Recommended PHP Versions

* Beta support: This means the compatibility of WordPress with PHP is still being tested. If you prefer
to avoid any hassles or you found it difficult to upgrade to a beta-support PHP version, we recommend
using the latest fully-supported PHP version till the beta test ends. You can just follow this article for
future updates.
7. What Is The Latest PHP Version for WordPress?
PHP work on a continuous basis to update their framework and fix bugs and security issues.
Similarly, WordPress aims to support new versions of PHP as they are being published.

The latest version of PHP that is currently supported by WordPress is  PHP 8.2 and it’s
supported by WP 6.1.

Nevertheless, the compatibility of WordPress with PHP 8.x is still in the beta support phase.
That said, most WordPress functionalities will work but you might expect some minor issues
to happen sometimes.

Furthermore, some plugins and themes might be not yet compatible with PHP 8.x. So we
recommended checking the compatibility of your addons before updating to recent versions
of PHP.

8. How To Check WordPress PHP Version?


To find the PHP version being used by your WP installation, you just need to follow the
following simple steps:

1. Log in to your WP Admin Dashboard.


2. Navigate to the sidebar menu and choose: Tools then Site Health.
3. From the opened interface, choose Info tab.
4. From the list displayed, navigate to Server section and click on the small arrow to
expand it.
5. Here you will find your PHP version as well as other server details.

WordPress used PHP version in Admin Dashboard

To read our easy guide with pictures to finding PHP version in WordPress without a
plugin please refer to this article. In case you are unable to access the admin control panel,
you can find the PHP version by accessing your hosting cPanel or consulting your hosting
service provider.
What is AJAX?
AJAX = Asynchronous JavaScript And XML.

AJAX is not a programming language.

AJAX just uses a combination of:

 A browser built-in XMLHttpRequest object (to request data from a web server)
 JavaScript and HTML DOM (to display or use the data)

AJAX is a misleading name. AJAX applications might use XML to transport data, but it is
equally common to transport data as plain text or JSON text.

AJAX allows web pages to be updated asynchronously by exchanging data with a web server
behind the scenes. This means that it is possible to update parts of a web page, without
reloading the whole page.
How AJAX Works

 1. An event occurs in a web page (the page is loaded, a button is clicked)


 2. An XMLHttpRequest object is created by JavaScript
 3. The XMLHttpRequest object sends a request to a web server
 4. The server processes the request
 5. The server sends a response back to the web page
 6. The response is read by JavaScript
 7. Proper action (like page update) is performed by JavaScript

Glossary

Dec 13, 2022


Domantas G.
5min Read

What Is AJAX and How Does It


Work?
The term AJAX stands for Asynchronous JavaScript and XML. Understanding AJAX is
essential for web developers since it is commonly used in popular web applications
like Google Maps, Gmail, Facebook, and Twitter.
This article covers everything you need to know about AJAX, including its definition,
practical examples, how to learn the technique, and its pros and cons.
Download Glossary For Web Beginners
 
o What Is AJAX?
o How Does AJAX Work?
o Practical Examples of AJAX
o Should I Learn AJAX?
o AJAX Pros and Cons
o Pros
o Cons

What Is AJAX?
AJAX stands for Asynchronous JavaScript and XML. It is a set of web development to
build more responsive websites and applications. AJAX allows web pages to update
their content without users having to reload the page.
AJAX is derived from JavaScript’s function to allow for a more interactive
experience. JavaScript  creates, adds, and manages dynamic structure by monitoring
which content requires real-time updates while a visitor is accessing a website.
Get a modern, fully-responsive website without needing to write a single line of
code.Build Your Website

Meanwhile, Extensible Markup Language (XML) transports the data between the web
server and the browser. Aside from XML, other formats like plain text and JSON are
frequently used for exchanging data.
JavaScript and Extensible Markup Language work together under AJAX to ensure the
web page content is updated asynchronously. In other words, with AJAX, site content
can be updated without reloading the entire page.

How Does AJAX Work?


AJAX comprises the following technologies:

 XHTML and CSS – for presenting the information.


 The Document Object Model (DOM) – for the dynamic display data and its
interaction.
 XML, HTML, and XSLT – for data interchange and manipulation. However, many
developers have replaced XML with JSON since it originated from JavaScript.
 XMLHttpRequest object – allows asynchronous communication with the web
server.
 JavaScript – the programming language  that links all these web technologies.
The general principles of AJAX are simple. However, having existing technical
knowledge will help you understand the workflow faster.
Take a look at the diagram and table below to compare the conventional model vs the
AJAX model of a web application.
Diagram:
Comparison table:
Conventional model AJAX model

The browser sends an HTTP request to the The browser creates a JavaScript call, which then
server. creates a new XMLHttpRequest object.

The new XMLHttpRequest object transfers data


The web server receives and processes the
between the browser and the web server in an XML
request.
format.

The XMLHttpRequest object sends a request for the


The web server sends the requested data updated page data to the web server. Subsequently,
to the browser. the latter processes the request and sends it back to
the browser.

The browser receives the data from the The browser uses JavaScript to process the response
server and reloads it as an HTML page. and displays the updated content directly on the
Users have to wait until it finishes loading.
Therefore, the conventional model HTML page without reloading.
increases the load on the server and is
more time-consuming.

Practical Examples of AJAX


An example of AJAX is the Google Autocomplete feature. This feature offers keyword
suggestions, helping users complete their search query when typing into the search
bar. The changes happen in real-time, but the web page remains the same.

AJAX allows the data exchange and presentation layer to work simultaneously without
interfering with each other’s functions.
This was not the case in the early 90s when this new technology was yet to be
introduced. You had to reload Google for a new recommendation to appear on your
screen.
Here are more helpful examples of the AJAX method in our everyday lives:

 Voting and rating systems – once you click a rate or vote button, the website
automatically updates the calculation without refreshing the page.
 Chat rooms – some websites implement a built-in customer support chat room
on their main page. Using AJAX, you can talk with a customer support
representative while exploring the website. The web page won’t need to reload
whenever you send or receive a new message.
 Social media – many social media applications, such as Twitter use AJAX to
update their users’ timelines. The system will request and retrieve data from the
server when you post a new tweet. Then, it will display the new tweet on top of
the timeline.

Should I Learn AJAX?


Learning AJAX is relatively easy, especially if you have prior knowledge of HTML,
XML, JavaScript, and CSS.
For advanced developers, understanding AJAX can only take one or two hours since
the technique implements the development skills you have already mastered.
If you’re a beginner, it usually takes an hour to learn the fundamental principles and a
day or two to understand XMLHttpRequest syntaxes – the key to AJAX.
Whether you’re an advanced or new developer , we recommend practicing using real-
world examples to master the technique.
Here are four steps to learn AJAX:

1. Familiarize yourself with JavaScript, HTML, XML, and CSS – these


languages are prerequisites for learning AJAX.
2. Research how AJAX is used – learn how AJAX is applied to web apps and the
techniques used to develop them. For example, study Google Maps, which runs
AJAX to retrieve new map data.
3. Study jQuery – many web applications that use AJAX also run jQuery.
Therefore, we recommend learning the basics of jQuery to write advanced AJAX
applications.
4. Create a project using AJAX – put your development knowledge and skills into
practice.
Like other popular web development topics, AJAX has many learning resources. In this
section, we have listed the five best online courses  to learn AJAX:

 Learn JavaScript AJAX in 1 hour by Udemy  – this course will teach you how
to use AJAX to run GET and POST requests, create an interactive experience,
and build dynamic content. It consists of an hour-long video, and the price
is $14.99.
 JavaScript and AJAX: Integration Techniques by LinkedIn Learning  – in this
course, you will learn the basic principles of AJAX and how to incorporate XML,
jQuery, and JSON. This course costs $34.99.
 Intro to AJAX by Udacity  – this free course will teach you how to make
asynchronous requests using jQuery’s AJAX functionality and user data APIs.
You will also get to build a web application  to practice your skills.
 AJAX Introduction by W3Schools  – in this free course, you will learn about the
basics of AJAX. In addition, W3Schools provides quizzes and practices in every
section to test your knowledge.
 AJAX Tutorial by Tutorials Point  – this free course will teach you the basic
principles of AJAX and how to apply it. Tutorials Point also recommends other
courses related to the topic to help you understand AJAX better.
AJAX is a universally used technique and an essential part of front-end development,
making it one of the most in-demand skills. According to Glassdoor , the
average salary of a front-end developer  is around $102,000/year.
Developers with less than one year of experience earn about $100,000/year. On the
other hand, senior front-end developers may receive an average salary of
over $120,000/year.

AJAX Pros and Cons


Before using AJAX, consider its pros and cons:
Pros
 Allows a browser to update bits of content without reloading or opening a new
page.
 Reduces server traffic by allowing web applications to render without data.
 Uses less bandwidth since it fetches little bits of content.
 Lets browsers make asynchronous calls to the web server without reloading the
whole page.
 The XMLHttpRequest object in AJAX establishes an independent connection
between a website server  and the client-side machine.
 Creates responsive interactions. Mouse movements that aren’t user clicks can
also trigger events.

Cons
 If your browser doesn’t support or enable JavaScript, it will not load web pages
using AJAX properly.
 Anyone can view the source code of a web application developed using AJAX,
making it less secure.
 AJAX works asynchronously. Therefore, some page information may not
correspond to a newly loaded one.
 When a user hits the back button on their browser, they may not return to the
previous state of the page. Successive AJAX requests are not saved to the
browser’s history.
 Debugging a web page built using AJAX may be difficult.
 Multiple server requests consume more data.
Make sure your website can handle everything – from high traffic to fast loading times,
and more.Buy Web Hosting

Conclusion
AJAX is a collection of web development techniques primarily used to send and
receive data from a server asynchronously.
AJAX lets you create a dynamic and interactive experience. It automatically adds new
information to the existing page without reloading the entire website.
As the method becomes more popular, there are many job opportunities for web
developers with knowledge of AJAX. We have compiled a list of resources to help you
learn AJAX, including online courses from Udemy, Linkedin Learning, Udacity,
W3Schools, and TutorialsPoint.
In addition, we have explained the pros and cons of building an AJAX application.
We hope this article has helped you understand AJAX better. If you have any
questions or suggestions, please leave them in the comments section below.
AJAX communicates with the server using XMLHttpRequest object. Let's try to understand the flow of
ajax or how ajax works by the image displayed below.

As you can see in the above example, XMLHttpRequest object plays a important role.

1. User sends a request from the UI and a javascript call goes to XMLHttpRequest object.
2. HTTP Request is sent to the server by XMLHttpRequest object.
3. Server interacts with the database using JSP, PHP, Servlet, ASP.net etc.
4. Data is retrieved.
5. Server sends XML data or JSON data to the XMLHttpRequest callback function.
6. HTML and CSS data is displayed on the browser.

You might also like