Tag: PHP-FPM

Installing PHP for Nginx on Ubuntu 18.04

Installing PHP for Nginx on Ubuntu 18.04

In this guide we will install and configure PHP to work with Nginx on Ubuntu 18.04 LTS (Bionic Beaver). Unlike Apache, Nginx does not contain native PHP processing. For that we have to install PHP-FPM (FastCGI Process Manager). FPM is an alternative PHP FastCGI implementation with some additional features useful for heavy-loaded sites.

1. Install PHP-FPM Let’s begin by updating the package lists and installing PHP-FPM on Ubuntu 18.04. Below we have two commands separated by &&. The first command will update the package lists to ensure you get the latest version and dependencies for PHP-FPM. The second command will then download and install PHP-FPM. Press y and ENTER when asked to…

Continue reading Installing PHP for Nginx on Ubuntu 18.04

Guide: Installing PHP for Nginx (Ubuntu 16.04 / 17.10)

In this guide we will install and configure PHP-FPM to work with Nginx. Unlike Apache, Nginx does not contain native PHP processing. For that we have to install PHP-FPM (FastCGI Process Manager). FPM is an alternative PHP FastCGI implementation with some additional features useful for heavy-loaded sites. 1. Install PHP-FPM Let’s begin by installing PHP-FPM.…

Continue reading Guide: Installing PHP for Nginx (Ubuntu 16.04 / 17.10)

Nginx Default Config File for PHP-FPM

Here is the default Nginx config file with alterations to work with PHP-FPM. You can copy and paste this into your config file, you just need to change the line YOUR_DOMAIN_OR_IP_HERE to your own domain or IP address. These are the changes made to the default Nginx configuration file to work with PHP-FPM. Add index.php…

Continue reading Nginx Default Config File for PHP-FPM

WordPress “HTTP error” on large image file upload

I ran into a problem with WordPress on my DigitalOcean droplet recently. When uploading files larger than 10MB, WordPress would return a HTTP Error and fail to generate the thumbnail, although it did actually upload the file. Checking the Nginx error log I saw: /var/log/nginx/error.log 2017/05/05 23:11:48 [error] 2755#2755: *5 recv() failed (104: Connection reset…

Continue reading WordPress “HTTP error” on large image file upload

How to Restart PHP-FPM Service and Reload Config

To restart the PHP-FPM service and reload the configuration file, firstly check which version of PHP you are running: php -v PHP 7.2.15-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Feb 8 2019 15:38:01) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.15-1+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend…

Continue reading How to Restart PHP-FPM Service and Reload Config

PHP 7 PHP-FPM Configuration File Location?

In this article we will locate a few different config files that relate to your PHP-FPM install. FPM uses php.ini syntax for its configuration files php-fpm.conf and pool configuration file www.conf.

php.ini If you are looking for the php.ini file, please see article: Where is my PHP php.ini Configuration File Located? php-fpm.conf If you have the locate command, you can simply search for the file: locate php-fpm.conf Alternatively, confirm which version of PHP you are using by listing the PHP directory. ls /etc/php/ 7.2 Above we…

Continue reading PHP 7 PHP-FPM Configuration File Location?