How to Start, Restart, Stop and Reload PHP-FPM Service

How to Start, Restart, Stop and Reload PHP-FPM Service and Check service status and active PHP version on Ubuntu Linux Severs

Many web servers like Nginx, Apache and other, PHP-FPM is a FastCGI process manager for PHP. Sometimes we need to restart the server for various reasons: changing settings for example, and depending on what Linux we have on the server there are some variations in the commands used.

Use the following command for relevant tasks:

$ sudo systemctl start php7.4-fpm.service # start php-fpm
$ sudo systemctl stop php7.4-fpm.service # stop php-fpm


Continue reading


Published on: 10/01/2021, 1:20 AM

How to remove "www" and redirect to "http" to "https" on Nginx webserver

The best way to accomplish this is using three server blocks as follow:

  1. Redirect default http to https
  2. Redirect https www to https non-www
  3. Actual handle requests https

The reason for using extra server blocks instead of "if" directive is that server selection is performed using a hash table, and is very fast. Using a server-level "if" directive means, its run for every request, which is wasteful. Also, capturing the requested uri in the rewrite is wasteful, as Nginx already has this information in the $uri and $request_uri variables (without and with query string, respectively).


Continue reading


Published on: 27/07/2019, 3:49 AM

FTP stands for File Transfer Protocol. It is a protocol used to transfer files between an FTP host or server and the client computer. FTP is most commonly used to download files from servers on the Internet. It is an alternative to the HTTP protocol for downloading and uploading files to servers.

The history of FTP

In the early days of computing, complex sets of commands had to be learned to use the Internet. FTP, invented in the early 1970s, established a standard protocol for transferring files between systems.

FTP protocols used for the Internet standard were drafted by the Internet Engineering Task Force committee as a series of RFC (Request for Comments) formal documents. In 1971 the FTP protocol RFC 114 was published. Over the years the document was revised with newer versions making changes to improve the FTP protocol.


Continue reading


Published on: 18/07/2019, 3:19 PM

Linux is a clone of UNIX, the multi-user operating system which can be accessed by many users simultaneously. Linux can also be used in mainframes and servers without any modifications. But this raises security concerns as an unsolicited or malign user can corrupt, change or remove crucial data. For effective security, Linux divides authorization into 2 levels.

  1. Ownership
  2. Permission

There are three user categories: 

  • User (the owner of the file)
  • Other (for the world to see)
  • Group (the security group you are in)


Continue reading


Published on: 10/07/2019, 10:45 AM


How to set Files and Folder permission for Wordpress?

If you have issue on uploading image on Wordpress after migration, most of the cases are due to permission.

So, you can try fixing the permissions of files and folders on your server by running the following commands on your server and it'll set the right permission.

#Give Ownership To www-data

$ chown -R www-data:www-data /var/www


Continue reading


Published on: 20/06/2019, 8:26 AM

How to optimize MySQL performance using Mysqltuner on linux server?

This quick tutorial of how you can optimize the performance of a MySQL database with the mysqltuner script. This tool can be used for MySQL and MariaDB.


Install mysqltuner

The mysqltuner High-Performance MySQL Tuning Script is available as a package on Debian 10 and Ubuntu 20.04, install it with at:

$ sudo apt-get install mysqltuner

For other Distributions, download and install mysqltuner as described below:

$ cd /usr/local/bin
$ wget $ mv mysqltuner $chmod +x mysqltuner


Continue reading


Published on: 15/06/2019, 6:33 AM