In short
To change the PHP version in cPanel, open MultiPHP Manager in the Software section, check your domain, select the new version from the list and click Apply. You can change values such as memory_limit, upload_max_filesize and post_max_size per domain in the Basic Mode screen of MultiPHP INI Editor. Back up your site and test your application's compatibility before upgrading.
In this guide
Changing the PHP version in cPanel takes seconds with MultiPHP Manager: you select the domain, choose the new version and apply it. Settings such as memory_limit or upload_max_filesize are edited in MultiPHP INI Editor. That is the easy part; what really matters is making sure the version change does not break your site. This guide covers both tools and a safe upgrade process.
Why keep your PHP version up to date?
Each major PHP version gets active support for a set period, then security fixes only, and finally reaches end of life. Security vulnerabilities found in an unsupported version are no longer patched. Newer versions also tend to run more efficiently, meaning they generate the same page with less CPU time. You can follow the current support schedule on the php.net supported versions page.
On the other hand, an old plugin or custom code may not work on a newer version. So the right approach is not "pick the newest one" but "pick the newest stable version your application supports."
Changing the PHP version with MultiPHP Manager
- Log in to cPanel and click the MultiPHP Manager icon in the Software section.
- The server's default PHP version is shown at the top of the page. The table below it has a separate row for each domain, subdomain and addon domain.
- Check the box to the left of the domain you want to change.
- Select the new version from the PHP Version list at the top right. Versions use EasyApache naming such as
ea-php82andea-php83; the number indicates the PHP version. - Click Apply. The change usually takes effect immediately.
The nice thing about this method is that you can choose a different version for each domain. For example, your main site can run on a current version while a subdomain hosting an older app stays on the previous version for now. On some server configurations, the PHP version and extensions are managed from a screen called Select PHP Version; the logic is the same.
Verifying which version is active
To confirm the change was actually applied, place a temporary file in your site's root directory:
<?php
phpinfo();Save the file with a hard-to-guess name such as bilgi-7x2k.php and open it in your browser; at the top you will see the active PHP version, and the Loaded Configuration File line shows which configuration file is being read. Always delete the file after checking, because it exposes detailed information about your server.
Editing PHP settings with MultiPHP INI Editor
MultiPHP INI Editor, in the same Software section, has two modes:
- Basic Mode: Edit common settings with drop-down menus and fields. Select the domain, change the values and click Apply.
- Editor Mode: Edit the configuration file in the selected directory directly as text. Use it when you need to add a directive that is not available in Basic Mode.
The most commonly changed PHP settings
| Setting | What it does | Typical starting value (suggested) |
|---|---|---|
memory_limit | Maximum memory a single PHP process can use | 256M; 512M for WooCommerce and page builders |
upload_max_filesize | Maximum upload size for a single file | 64M or as needed |
post_max_size | Total size of a form submission | Equal to or greater than upload_max_filesize |
max_execution_time | Maximum run time of a script, in seconds | 60-300; raised temporarily for import jobs |
max_input_vars | Maximum number of variables processed in one request | 3000 or higher; for large menus and theme options |
display_errors | Shows errors to visitors | Off on a live site |
These values are not strict rules but common starting points. Setting very high values without a need does not solve problems; it only lets a faulty script consume more resources.
Watch how the settings relate to each other
- If
post_max_sizeis smaller thanupload_max_filesize, large file uploads fail silently. memory_limitcannot exceed your plan's total RAM limit. For example, assigning 2G of memory to PHP on a plan with 1 GB of RAM does nothing useful; a few PHP processes running at once quickly fill the plan's memory limit.- If you changed a setting but do not see the effect, the application may define a lower value internally (for example
WP_MEMORY_LIMITin WordPress). For WordPress specifically, see the guide to increasing the WordPress memory limit.
Where settings are written and which one wins
MultiPHP INI Editor writes a configuration file to the document root of the domain you select; on common configurations this file is named .user.ini or php.ini and applies to that directory and its subdirectories. That is why settings are per domain: raising memory_limit on your main site does not affect the site on an addon domain. In Editor Mode, you can also add directives to the same file that Basic Mode does not offer:
memory_limit = 512M
upload_max_filesize = 128M
post_max_size = 128M
max_execution_time = 300
max_input_vars = 5000The method of adding php_value lines to .htaccess, often recommended in older guides, may work or may cause a 500 error depending on how the server runs PHP. Managing settings in one place through INI Editor is safer and easier to trace when something goes wrong. If a setting does not apply as expected, the Local Value column in the phpinfo output shows the value actually in effect for that directory.
Checking compatibility before a PHP upgrade
Instead of trial and error on your live site, follow this order:
- Back up. Back up your files and database so you have a way back if something goes wrong.
- Check the application's requirements. WordPress, plugins and themes list the PHP versions they support. Current Laravel versions require PHP 8.2 or later; the
"php"line in your project'scomposer.jsonfile tells you which version is required. - Update components first. Upgrade PHP after updating WordPress core, plugins and your theme; outdated plugin versions are the most common source of problems.
- Test in a staging environment. Create a copy of the site on a subdomain and test the new version there. For WordPress, the guide to creating a staging (test) site makes this step easy.
- Monitor error logs. Check the
error_logfiles and cPanel error logs for a few days after upgrading.
Typical errors after an upgrade
- White screen or 500 error: Usually caused by a plugin that uses a removed function.
create_function()andeach()were removed entirely in PHP 8, and the oldmysql_*functions were removed in PHP 7. The error log shows which file and line are causing the problem. - Deprecated warnings: The site works, but it uses features that will be removed in the future. On a live site,
display_errorsshould be off and warnings should go only to the log. - Missing extension error: A
Call to undefined functionmessage can mean the relevant PHP extension (for exampleintl,gdorimagick) is not enabled for the selected version.
If something breaks, switching back to the previous version in MultiPHP Manager also takes just seconds.
PHP version for the command line and cron
MultiPHP Manager sets the version for web requests; the php command in the terminal or in cron jobs may use a different version. With Laravel's artisan commands and scheduled tasks, this difference leads to surprising errors. On cPanel servers, you can call a specific version by its full path:
# Check the version
/usr/local/bin/ea-php83 -v
# Laravel scheduler in Cron Jobs
* * * * * /usr/local/bin/ea-php83 /home/kullanici/projem/artisan schedule:run >> /dev/null 2>&1Change the ea-php83 part of the path to match the version you selected for your site. For cron setup details, see the guide to setting up cron jobs in cPanel. To run terminal commands directly on the server, Laravel hosting plans offer Terminal/SSH access, Composer and Git, along with a choice of PHP versions up to PHP 8.5.
Next step: the right PHP environment for your project
For a simple business site or blog, what you need is a plan that lets you manage the PHP version and settings yourself in cPanel, plus enough RAM for PHP processes. Sunucu Atlas cPanel web hosting plans come with the LiteSpeed web server and NVMe storage; for memory-hungry WordPress or WooCommerce sites, the SA-CP-2 hosting plan with 2 GB of RAM and 2 cores is a comfortable starting point. For developers working with Composer dependencies, artisan commands and multiple PHP versions, the SA-DEV-2 Laravel hosting plan brings 3 GB of RAM, a terminal and Git together in the same panel.
Frequently asked questions
When does a PHP version change in cPanel take effect?
The change is usually applied immediately after you click Apply in MultiPHP Manager. To verify it, open a temporary phpinfo file to check the active version, then delete the file.
Can I use a different PHP version for each domain?
Yes. MultiPHP Manager lets you choose a version separately for the main domain, subdomains and addon domains.
What should I set memory_limit to?
256M is a good starting point for most sites; WooCommerce and page builders may need 512M. The value should not exceed your plan's total RAM limit, so setting it higher than necessary does not help.
My site broke after upgrading PHP. What should I do?
Switch back to the previous version in MultiPHP Manager to get the site working again right away. Then use the file and line details in the error log to update the incompatible plugin or theme, and retry the upgrade in a staging environment.
I changed upload_max_filesize but still cannot upload large files. Why?
post_max_size may still be smaller than upload_max_filesize. The application's own upload limit or the max_execution_time value can also get in the way.