My Recommeded WordPress PHP / PHP-FPM Settings on Ubuntu 16.04 | 18.04 | 18.10

WordPress, the most popular content management system (CMS) in use today can be configured 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. In order for WordPress to function at its maximum performance levels, you much configure these different servers to WordPress’ recommended settings.

Now, what are WordPress 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 settings. 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 Apache2 HTTP server can be found here:

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

PHP-FPM settings page on Ubuntu when running 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 do run other settings for WordPress please mention in the comment area below. our users will greatly appreciate it.

Again, the settings above are not WordPress recommended PHP settings. These are settings that I run on all my WordPress blogs and websites and they have always serve be 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: