Redirect

Redirect a site to HTTPS using PHP
Redirect HTTP to HTTPS when using Reverse Proxy
Redirect site from www to non-www

Redirect a site to HTTPS using .htaccess file

Redirect a web site to SSL using Apache Virtual Host

OR

Redirect a Site to HTTPS using PHP

Redirect www to non-www URL

Plesk MySQL Daily Backup Script

Create file

With following content

Set it to run as cronjob

cronjob

To save result of a cronjob to a file, use

To list all cronjob, run

To edit all cronjobs, run

Disable cronjob output

To disable cronjob output, add following to end of the script

or

crontab
Start a program after reboot using cronjob
Running wp-cron with cronjob
Cronjob for Magento 1.9

Language

On Linux server if language is different, you can change it to English for current session by running

Example

See current language

List Available Languages

Change langauage

locale-gen

cut

Here is an example of cut command, that will remove all PHP packages from system

apt

List all Dependency for a package.

Errors

This web site allow you to generate /etc/apt/sources.list file for Ubuntu/Debian.

https://repogen.simplylinux.ch

This is helpful when you need to recreate your repo file.

Errors

apt fail after MariaDB to MySQL change

MySQL User

To allow a user to create another user

Now this user will be able to create new users.

Create a user with root privilages

For MySQL 8

Enable FCGI cache in Nginx

To enable fcgi cache in Nginx, add following code outside server block.

Inside your location for .php files, above the proxy_pass, add

Example