Help Docs Control Panel Guides Cloud Sites Guide Website Management in Cloud Sites PHP for Cloud Sites Change PHP Settings for WordPress in Cloud Sites

Change PHP Settings for WordPress in Cloud Sites

Update the PHP memory limit, max file size, post size and execution time for Wordpress in Cloud Sites.

When using WordPress as the CMS for your website, you may find it necessary to update the memory limit, max file size, post size and execution time in PHP. Increasing these limits allows you to successfully post pictures, run scripts, publish posts, and allow your site to run more smoothly. Traditionally, when you host your WordPress site using a traditional VPS, dedicated server, or Liquid Web’s Managed WordPress hosting, you would log into your site via SSH, and edit the php.ini file. 

Editing The .htaccess File

If you are unfamiliar with logging into your Cloud Sites via command line and editing configuration files, contact a developer to assist you.

Because of server configurations, Cloud Sites doesn’t allow modification of the php.ini file in order to configure php settings. Instead, php variable settings are available in the .htaccess file of your site. If you’re unfamiliar with an .htaccess file, you can learn more in our article What Is an .htaccess File?.
The initial settings for Cloud Sites .htaccess PHP limits are:

php_value memory_limit  128M  
php_value upload_max_filesize 8M
php_value post_max_size 8M
php_value max_execution_time 30
php_value max_input_time 60

You will notice, the PHP settings syntax is slightly different in Cloud Sites than other WordPress PHP settings on a traditional server configuration. You must use php_value at the beginning of each line in order to change the PHP settings in Cloud Sites.

When logging into your .htaccess file, you can scroll to the PHP section of the .htaccess file and change the limits. They are set in Megabytes, so make sure to use the same syntax when making your changes. The limits shown below are the maximum limits that Cloud Sites allows.

To increase your PHP settings to their MAX levels, make the following changes to your .htaccess file:

php_value memory_limit 512M
php_value upload_max_filesize  64M
php_value post_max_size 64M
php_value max_execution_time 300
php_value max_input_time 259200

Warning: Setting MAX Limits

While you can adjust the PHP limits to any number up to the values indicated above, setting them any higher will not actually increase the limits. Cloud Sites caps your PHP limits to protect you from making changes that may slow down your site performance. If you are still experiencing issues with your site, consult a developer.
Was this article helpful?