Here are my Recommended WordPress PHP Settings on Ubuntu Linux

programmer 1653351 640
programmer 1653351 640

WordPress, the most popular content management system (CMS) in use today, can be configured in many ways on many different platforms. However, how do you configure it on Ubuntu servers to achieve maximum performance?

To run WordPress, you need a web server, database server, and PHP scripting language. For WordPress to function at its maximum performance levels, you much configure these different servers to WordPress’ recommended settings.

Now, what are WordPress’s recommended settings? Are there any? How about PHP / PHP-FPM? How do you configure it to enhance WordPress’ performance?

One area that most people don’t discuss much is PHP / PHP-FPM settings for WordPress. To enhance WordPress performance. I run these PHP / PHP-FPM settings on all my WordPress blogs and websites. You may have other locations, but these have always worked for me.

When you install WordPress, open your PHP or PHP-FPM settings page.

PHP settings page on Ubuntu when running the Apache2 HTTP server can be found here:

sudo nano /etc/php/7.x/apache2/php.ini

PHP-FPM settings page on Ubuntu when running the Nginx HTTP server can be found here:

sudo nano /etc/php/7.x/fpm/php.ini

Replace the highlighted field with the version of PHP or PHP-FPM you’re running.

On all my WordPress blogs and websites, these are the settings that I run:

max_execution_time = 300
max_input_time = 600
max_input_vars = 10000
memory_limit = 256M
post_max_size = 100M
cgi.fix_pathinfo = 0
upload_max_filesize = 100M
max_file_uploads = 40
date.timezone = America/Chicago

I usually run a Ubuntu server with 5GB RAM, and the settings above are optimal.

If you run other WordPress settings, please mention them in the comment area below. Our users will greatly appreciate it.

Again, the settings above are not WordPress-recommended PHP settings. However, these are settings that I run on all my WordPress blogs and websites, and they have always served me well.

I also run Nginx, MariaDB, and PHP with WordPress on all my sites.

If you have other good settings, please mention them below.


You may also like the post below:

Posted by

I love computers; maybe way too much. What I learned I try to share at

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: