,

Here are my Recommended WordPress PHP Settings on Ubuntu Linux

The post explains how to configure WordPress on Ubuntu servers for maximum performance. The discussion includes running servers with recommended WordPress settings and modifying PHP/PHP-FPM settings. Specific PHP configurations such as max_execution_time, max_input_vars, and memory_limit are provided and have been effective on author’s WordPress blogs and websites.

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.

Thanks,

You may also like the post below:

Richard Avatar

Comments

Leave a Reply

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


Exit mobile version