A plugin update fails, a hosting support agent asks which PHP release your site uses, and you are not sure where to look. This guide shows you how to check PHP version information on a WordPress site in 2026, what the results mean, and when a temporary phpinfo() page is useful.
You will learn the safest method first, followed by practical options for hosting dashboards, command-line access, and a short diagnostic file. You will also see why an open phpinfo page can expose more information than you intended and how to remove it properly.
Why PHP version information matters
PHP is the server-side programming language that WordPress uses to build pages before sending them to a visitor’s browser. Think of PHP as the kitchen behind a restaurant: WordPress, your theme, and your plugins provide the recipe, while PHP prepares the final page.
Your PHP release affects compatibility, security maintenance, and performance. A current, supported release can help your site run reliably, but changing versions without preparation can also reveal conflicts in older themes or plugins. That is why you should record the current setting before making a hosting change.
Knowing the version can help you:
- Investigate a fatal error after a plugin or theme update.
- Confirm whether a hosting support recommendation applies to your site.
- Compare the server environment with a plugin’s documented requirements.
- Check whether a staging site and the live site use different configurations.
- Decide what information to include in a support ticket.
Version information is only one part of the picture. Memory limits, loaded extensions, the web server, and configuration values can also explain why two WordPress sites behave differently even when they use the same PHP release.
Check PHP version first with WordPress Site Health
For most WordPress site owners, Site Health is the best first option. It avoids uploading a public diagnostic file and presents the server details inside the WordPress dashboard.
- Sign in to your WordPress dashboard.
- Open Tools > Site Health.
- Select the Info tab.
- Expand the Server section.
- Look for the PHP version, PHP memory limit, maximum input variables, maximum execution time, and related server details.
This method is similar to checking a vehicle’s dashboard instead of removing the engine cover. You get the information needed for routine checks without exposing every internal component.
Site Health may not display every setting available from the server. If a developer needs request variables, loaded modules, or master and local configuration values, use a controlled diagnostic method instead. For ordinary maintenance, however, the built-in screen is usually enough.
Use your hosting control panel or support team
Your hosting company may provide a PHP selector, server information screen, or application manager. The menu name varies, so look for labels such as PHP Manager, PHP Selector, MultiPHP Manager, or Server Information.
A hosting dashboard often shows the version assigned to a domain and may allow you to change it. Treat that button as a configuration change, not as a harmless information lookup. Before switching versions, create a backup, confirm that your theme and plugins are maintained, and test the site on staging if your host provides it.
Here is a realistic example. A small online store receives an error after its host changes the PHP setting. The owner checks Site Health, records the PHP release and memory limit, then gives those details to support. That short report is more useful than saying only, “The checkout stopped working.”
If the dashboard does not show the information, contact the host and ask for the PHP version assigned to the specific domain. Shared hosting accounts can contain several sites with different settings, so include the domain name and note whether you are asking about the live or staging environment.
Check PHP version with a temporary command-line check
If you have SSH access, the command line can provide a quick result without creating a web page. SSH is a secure way to open a text-based session on a remote server, normally using an account supplied by your hosting provider.
Run:
php -v
A typical result includes the installed PHP release and the command-line interface, often called the CLI. This is useful, but remember that the PHP used by the command line may not be the same PHP used by your website’s web server.
For example, a server could use one PHP configuration for scheduled scripts and another for requests sent through Nginx or Apache. If the command output does not match WordPress Site Health, ask your host which PHP handler serves the website.
You can also inspect loaded modules with:
php -m
Only run commands you understand and only use an account authorized to access the server. If you do not have SSH access, do not ask a developer to share a password in an email or chat. Use your host’s secure support process instead.
What the phpinfo() function shows
The PHP function phpinfo() generates a detailed report about the PHP environment. Depending on the options used, the report can show the PHP release, operating system details, web server information, loaded extensions, file paths, configuration values, environment variables, request data, and HTTP headers.
The function can display all available information:
<?php
phpinfo();
It also accepts information categories. For example:
<?php
phpinfo(INFO_MODULES);
Common categories include INFO_GENERAL, INFO_CONFIGURATION, INFO_MODULES, INFO_VARIABLES, and INFO_LICENSE. The exact output depends on the server and the category selected.
This makes phpinfo useful during debugging. Suppose a form works on staging but fails on the live site. A developer can compare the loaded extensions and relevant configuration values rather than guessing. In another example, a media-processing plugin reports that an extension is missing; the module list can help confirm what the server actually loads.
However, a phpinfo report is not a normal public WordPress page. It is more like leaving a detailed maintenance binder on a sidewalk. Anyone who can reach the URL may learn server paths, configuration details, request data, and other information that can help someone study your environment.
How to create and remove a phpinfo page safely
Use this approach only when Site Health or your hosting dashboard does not provide the information a trusted administrator or developer needs. Before uploading anything, confirm that you can restrict access and delete the file afterward.
1. Create the file
Open a plain-text editor and save a file with a temporary name ending in .php. The contents can be:
<?php
phpinfo();
Do not use a word processor, because it may add formatting that breaks the PHP file. Do not include a closing PHP tag unless your workflow requires one.
2. Restrict access before testing
Upload the file only through a secure method provided by your host, such as SFTP or the host’s file manager. Do not assume that placing the file in a less obvious folder protects it. A random filename is not authentication, and renaming the file does not prevent discovery or access.
Ask your hosting provider how to protect the file with an access rule, password protection, a temporary IP restriction, or another approved control. If you are not sure how to do this, have the host or a qualified administrator create the diagnostic file and secure it.
3. Open the report and record only what you need
With access restricted, open the file’s URL in a browser. Search the page for “PHP Version,” “Loaded Configuration File,” “memory_limit,” or the extension name you are investigating. Save only the relevant details in your private support notes.
For example, if a developer asks whether an image extension is available, send the extension status and PHP release rather than a public link to the full report. The less diagnostic data you share, the smaller the exposure if the message is forwarded.
4. Delete the file immediately
Remove the file from the server as soon as testing ends. Then check the URL in a private browser window or another connection to confirm that it no longer loads. Also remove any temporary access rule that you created solely for the test.
A useful cleanup checklist is:
- Delete the phpinfo file from the server.
- Confirm that the old URL returns an unavailable or not-found response.
- Remove temporary passwords, IP rules, or firewall exceptions.
- Check whether your host stores uploaded files in a separate location.
- Tell collaborators that the diagnostic link is no longer active.
Common mistakes when checking PHP details
The most common mistake is leaving a phpinfo page online. Even if nobody has visited it yet, a public diagnostic report is unnecessary exposure. Use it briefly, restrict it first, and delete it when finished.
Another mistake is confusing the PHP release with the WordPress version. WordPress is the content management system; PHP is the server language that runs it. They are related, but they are not the same setting.
People also sometimes change PHP immediately after finding an older release. A version change can affect plugins, themes, scheduled tasks, and custom code. Test first, keep a current backup, and make the change during a period when you can monitor the site.
Finally, do not treat a version number as a complete diagnosis. A site can fail because of memory limits, a missing extension, file permissions, a database problem, or incompatible code. Use the version as a clue, then compare logs and configuration with a trusted administrator.
Check PHP version safely: a practical decision guide
Use the least exposed method that answers your question:
| Need | Best first option | Why |
|---|---|---|
| Routine WordPress check | Tools > Site Health > Info > Server | It is built into the dashboard and avoids a public file. |
| Hosting configuration check | Hosting control panel or support | The host can confirm which PHP handler serves the domain. |
| Command-line investigation | php -v over SSH |
It is fast, but may show CLI settings rather than web settings. |
| Detailed debugging | Restricted, temporary phpinfo file | It exposes more data, so it needs careful access control and cleanup. |
Consider a second example: a developer asks for the PHP release and memory limit before reviewing a slow membership site. Site Health provides both details, so creating a phpinfo file would add risk without adding value. In contrast, a server administrator comparing module settings across staging and production may need a restricted report for a short test.
Frequently asked questions
How do I check PHP version in WordPress?
Open the WordPress dashboard and go to Tools > Site Health > Info > Server. The Server section normally shows the PHP version and other useful limits without requiring a public diagnostic file.
Is it safe to leave phpinfo.php on my website?
No. A public phpinfo page can reveal server paths, configuration, request data, and loaded modules. Restrict access before testing and delete the file immediately afterward.
Can I check PHP version without FTP?
Yes. Use WordPress Site Health, your hosting control panel, or SSH if your provider gives you access. These options are often safer and simpler than uploading a temporary file.
Why does my command-line PHP version differ from WordPress?
The command line and web server can use different PHP handlers or configuration files. Ask your hosting provider which PHP environment serves web requests, and use WordPress Site Health as the practical comparison point.
Final takeaway
For most site owners, the safest way to check PHP version details is WordPress Site Health. Use your host’s dashboard or support team when you need server-specific confirmation, and reserve phpinfo() for controlled debugging.
If you must create a diagnostic page, protect it before uploading, collect only the details you need, and delete it immediately. For related server work, see our guides on setting up Nginx with PHP-FPM and useful Linux commands. Your next step is simple: open Site Health now, record the server details privately, and investigate further only if a real compatibility problem requires it.

