- Advertisement -
HomeWeb Dev & CMSWordPressHow To Adjust php.ini Values in WordPress

How To Adjust php.ini Values in WordPress

Depending on the theme and configuration required, you’d need to know how to Adjust php.ini Values in WordPress. The most common values to configure are PHP Time Limit and PHP Max Input.

Background

WordPress is the most popular and most handy CMS when designing websites. However, some of its most simple settings can be bothersome and seen as a burden if you are not too familiar with web development.  

One of the remarkable aspects of WordPress is the variety of powerful plugins and themes you can install. Yet, this is also seen as a downside, as maintenance and configurations could become daily tasks.

Depending on the theme used, one of the first things you might need to adjust is some parameters/values from the WordPress php.ini configuration. More often than not, (premium) themes come with a Dashboard or System Status section where you can see the recommended values to utilize.

PHP Time Limit and PHP Max Input

One of the most common values to adjust are:

  • PHP Time Limit (max_execution_time)
  • PHP Max Input Vars (max_input_vars)
- Advertisement -

There are others, such as upload_max_filesize and post_max_size, to control the maximum file size (images) that you can upload to your posts.   

The below image is an example of how your theme will display the system status. Again, this will vary depending on your theme.

System Status PHP Time Limit and PHP Max Input

How To Adjust php.ini Values in WordPress

There are some ways to adjust PHP.ini values. You can do it directly in the php.ini file, wp-config.php file, or even the .htaccess file. However, my preferred and safest way is to create an additional file to add or modify these values. So you don't have to touch the critical files.

The host you are using will also dictate how to access these files. For the sake of simplicity, I'll assume you are using a Cpanel.

From Cpanel, go to File > File Manager.

- Advertisement -

Located in your domain, go to the public_html folder. 

Note: If you have subdomains and use shared hosting like HostGator, you need to go to your subdomain folder. Ex: main_domain.com/sub_domain.com

Here, please create a new file, name it .user.ini, and then edit the file and input the values recommended by your theme.

For example, I am using:

max_input_vars = 5000
max_execution_time = 300
post_max_size = 50M
upload_max_filesize = 50M

After you save the file and refresh your theme dashboard or status page, you'll get something similar to the image below.

How To Adjust PHP Time Limit and PHP Max Input

Resources

wordpress.com

Juan Mulford
Juan Mulford
I have been active in IT for over fourteen years now. I am a solutions architect, working with storage, virtualization, and VDI solutions. For the past ten years, I have been living and working in Taiwan.

Leave a Reply

- Advertisement -

Popular Articles

mulcas.com-Raspberry-Pi

Raspberry Pi OS in a Virtual Machine with VMware

4
Although the Raspberry Pi OS is designed and optimized for the Raspberry Pi module, it is possible to test and use it without its hardware, with VMware. This solution can be useful if you are a developer (or just a curious guy) and don't have a Raspberry Pi module with you
Unable to delete inaccessible datastore

Unable to delete an "inaccessible" datastore

4
I was switching my storage array, so I migrated the VMs from that old datastore/storage to a new datastore/storage. The old datastore was shared by 3 ESXi hosts, no cluster. After migrating the VMs and unmount/delete the datastore, it was still presented in two of the ESXi hosts and was marked as inaccessible.
mulcas.com-VMware-OVF-Tool

How to export a Virtual Machine using the VMware OVF Tool

8
The VMware OVF Tool is implemented by VMware for easily importing and exporting virtual machines in Open Virtualization Format (OVF) standard format. Here, I want to show you how to download and install it, and then how to use it from a Windows machine.
This is not a valid source path / URL

This is not a valid source path / URL - SourceTree and Gitlab

0
I have been working on a project with a friend who set up a repository in Gitlab but even though I was able to view all projects on it, I couldn’t really join the repository. I was using SourceTree and Gitlab.
WinSCP VCSA

Unable to Access the VCSA 6.7 via WinSCP

8
One of the many and easiest ways to get the logs from the ESXi hosts and vCenter Server Appliance (VCSA), is accessing directly to the files directory using tools such as WinSCP, which helps to transfer the files between a local and a remote computer ( Ex. VCSA). I never have had issues with the ESXi hosts and WinSCP, however, trying to access the VCSA is a different story.
- Advertisement -

Recent Comments