How to Change PHP Settings in your Hosting Account

Installing a heavy WordPress template: Adjusting PHP Settings

Since WordPress themes get more robust and complex, it’s necessary that you release some more power from server. You can do that by editing php.ini file that you can find on your server, or contact your hosting service to do this for you.

Make sure you meet these requirements and please don’t skip this step, since it’s probably the most important:

Check existing PHP settings and configuration by creating a “phpinfo.php” file in the http main directory of the domain and fill it with the following code:

<?php phpinfo(); ?>

Save as phpinfo.php

Now open this file in the web browser. This is a long page outlining the PHP version and settings. For example we wish to increase the upload_max_filesize.

Create a “.user.ini” file in the http main directory of the domain and fill it with your custom settings e.g:

max_execution_time = 300;
memory_limit = 128M;
upload_max_filesize = 128M;
post_max_size = 256M;

Save as .user.ini

Now check to see if the setting has been changed by opening the file in the web browser again and searching for the record.

phpinistats2
phpinistats2

After a short time period (this takes a little time) these settings will have now been updated as shown in the above image.

Leave a Reply

Your email address will not be published. Required fields are marked *