How to Manage Your PHP Version and Settings

How to Manage Your PHP Version and Settings

Overview

PHP is a programming language used by many websites and web applications, including WordPress and many other content management systems.

Your hosting account uses a particular PHP version to run PHP-based websites. Applications and plugins may also have specific PHP version requirements.

Have Freedom Hosting provides PHP configuration tools through cPanel where available, allowing you to view and manage supported PHP versions and certain PHP settings for your hosting account.

Keeping PHP up to date and using a version supported by your website can improve compatibility, security, and performance.


What Is PHP?

PHP is software that allows a web server to execute dynamic website code.

For example, WordPress uses PHP to generate pages, process requests, communicate with its database, and run plugins and themes.

When someone visits a PHP-based website:

Visitor
   ↓
Web Server
   ↓
PHP
   ↓
Website Application
   ↓
Database, if required
   ↓
Web Page

If the PHP environment is incompatible with the application, the website may display errors or fail to load correctly.


Where Do I Manage PHP?

Depending on your hosting configuration, PHP settings may be available through cPanel tools such as:

cPanel → Software → MultiPHP Manager

and:

cPanel → Software → MultiPHP INI Editor

The exact tools and options available can vary by hosting plan and server configuration.

If you do not see these options, your hosting account may use a different configuration or may not provide customer-level access to those settings.


Checking Your Website's PHP Version

If your hosting account provides MultiPHP Manager, you can use it to view the PHP version associated with your domains.

To check:

  1. Log in to cPanel.

  2. Open MultiPHP Manager.

  3. Locate your domain.

  4. Review the PHP version shown for that domain.

Do not change the version simply because a newer version is available.

First make sure your website and applications support the version you intend to use.


Choosing a PHP Version

The best PHP version is generally the newest version that your website and applications fully support.

Before changing PHP versions, check the requirements for:

  • WordPress

  • Your WordPress theme

  • WordPress plugins

  • Other applications

  • Custom PHP code

  • Third-party integrations

An older website may contain code that no longer works correctly on newer PHP versions.

A newer website may also require a newer PHP version.


Why Should I Keep PHP Updated?

Using an outdated PHP version can eventually create:

  • Compatibility problems

  • Security concerns

  • Application limitations

  • Plugin or theme conflicts

  • Difficulty installing newer software

Keeping your website and PHP environment reasonably current helps avoid these problems.

However, updating PHP without checking compatibility can also break a website.

Always check your application's requirements first.


Before Changing PHP Versions

Before changing the PHP version for a live website:

  1. Create a current backup.

  2. Check your application's requirements.

  3. Check your plugins and themes.

  4. Check any custom PHP code.

  5. Confirm the target PHP version is supported.

  6. Change the version.

  7. Test the entire website.

If possible, perform major changes during a time when you can monitor the website afterward.


Changing a Domain's PHP Version

If MultiPHP Manager is available on your account, you can generally change the PHP version assigned to a domain from there.

The process may look similar to:

  1. Open cPanel → Software → MultiPHP Manager.

  2. Select the appropriate domain.

  3. Choose the supported PHP version.

  4. Apply the change.

  5. Test the website.

Only change the domain you intend to modify.

If you host multiple websites, each domain may have its own PHP configuration.


PHP Settings

PHP has many configurable settings that control how PHP behaves.

Examples include settings related to:

  • Maximum upload size

  • Maximum POST size

  • Maximum execution time

  • Memory limits

  • Maximum input variables

  • Error reporting

Some applications require particular values.

For example, a website that allows visitors to upload large files may require a higher upload limit than a simple informational website.


Managing PHP Settings With MultiPHP INI Editor

If available on your hosting account, MultiPHP INI Editor can be used to manage certain PHP configuration values.

To access it:

cPanel → Software → MultiPHP INI Editor

Depending on your hosting configuration, you may be able to select a domain and modify supported PHP directives.

Only change settings when you understand what the application requires.


Don't Change PHP Settings Randomly

You may find instructions online telling you to increase several PHP limits at once.

That isn't always necessary.

Changing settings without understanding them can:

  • Hide the real problem

  • Consume additional resources

  • Create unexpected behavior

  • Affect application performance

  • Make future troubleshooting more difficult

If an application reports that a particular PHP setting needs to be changed, start with that specific requirement rather than changing everything.


PHP Memory Limit

The PHP memory limit controls how much memory a PHP process can use.

Applications with large plugins, themes, databases, or complex operations may require more memory.

If an application reports a memory-limit error, first determine whether the application itself is responsible.

Increasing the limit may help in some situations, but it does not fix inefficient code or a problematic plugin.


PHP Upload Limits

PHP also controls how large certain uploaded files can be.

You may encounter settings related to:

  • upload_max_filesize

  • post_max_size

These can affect things such as:

  • WordPress media uploads

  • Plugin uploads

  • Theme uploads

  • Application imports

  • Web-based file uploads

If an application cannot upload a file because it is too large, check the application's requirements and the applicable PHP limits.


PHP Execution Time

PHP scripts are generally limited in how long they can run.

A long-running operation may fail if it exceeds the configured execution time.

This can affect tasks such as:

  • Large imports

  • Data processing

  • Database operations

  • Application updates

  • Large media processing

Increasing the execution time may help in certain cases, but excessively long-running scripts can consume hosting resources.


PHP Errors After Changing Versions

If your website stops working after changing PHP versions, the new version may not be compatible with something on the website.

Possible causes include:

  • An outdated plugin

  • An outdated theme

  • Deprecated PHP code

  • Custom code

  • An application that requires a different PHP version

  • A server-side configuration issue

Do not immediately assume that the server is broken.

First determine what changed and look for the specific application error.


WordPress and PHP

WordPress itself, along with its plugins and themes, relies heavily on PHP.

Before changing PHP versions on a WordPress website:

  1. Update WordPress.

  2. Update plugins.

  3. Update themes.

  4. Remove plugins or themes you no longer use.

  5. Create a backup.

  6. Check compatibility.

  7. Change the PHP version.

  8. Test the website.

Keeping WordPress and its components current makes PHP upgrades much easier.


What If My Website Breaks?

If your website stops working immediately after a PHP version change:

  1. Don't make several additional changes at once.

  2. Record the exact error.

  3. Check whether the website's application supports the selected PHP version.

  4. Check recently updated plugins, themes, or custom code.

  5. If necessary, return to the previously working PHP version while troubleshooting.

  6. Contact Have Freedom Hosting Support if you cannot determine the cause.

If reverting the PHP version restores the website, that is useful information when troubleshooting the underlying compatibility problem.


PHP and Different Websites

If you host several websites, remember that they may not all have the same requirements.

For example:

example.com
    PHP version: one supported version

anotherexample.com
    PHP version: another supported version

One application may work perfectly on a particular PHP version while another requires something different.

Always check the requirements for the specific website you're changing.


PHP Versions and Security

Using a supported PHP version is an important part of maintaining a secure website.

However, PHP is only one part of website security.

You should also keep:

  • WordPress updated

  • Plugins updated

  • Themes updated

  • Other applications updated

  • Your hosting account secure

  • Strong passwords in place

  • Backups available

Running a current PHP version does not make an otherwise outdated website secure.


When to Contact Have Freedom Hosting

Contact Have Freedom Hosting Support if:

  • You don't see the PHP management tools in cPanel.

  • You aren't sure which PHP version your website requires.

  • A PHP version change causes an error.

  • Your application requires a PHP setting you cannot change.

  • PHP errors continue after you've checked your application.

  • You suspect a server-side PHP configuration problem.

When contacting support, provide:

  • Your domain

  • The PHP version currently selected

  • The PHP version you attempted to use

  • The application you're running

  • The exact error message

  • Any recent changes you made

This information can make troubleshooting considerably faster.


Need Help?

PHP settings can have a significant effect on how a website operates. If you're unsure which version or settings your application requires, check the application's documentation first.

If you still aren't sure, Have Freedom Hosting Support can help you determine whether the issue is related to your hosting environment or your website application.

 

  • 0 Els usuaris han Trobat Això Útil
Ha estat útil la resposta?

Articles Relacionats

How to Chose the Right Website Setup for Your Hosting Account

How to Choose the Right Website Setup for Your Hosting Account Overview There are several ways...

How to Create and Manage a MySQL Database

How to Create and Manage a MySQL Database Overview Many websites and applications use a...

How to use phpMyAdmin

How to Use phpMyAdmin Overview phpMyAdmin is a web-based tool that allows you to manage MySQL...

How to Set Up SSL and HTTPS for Your Website

How to Set Up SSL and HTTPS for Your Website Overview HTTPS protects the connection between a...

How to Manage Website Files and Permissions

How to Manage Website Files and Permissions Overview Your website is made up of files and...

Powered by WHMCompleteSolution