Article overview

Help article

Plesk Tutorial Series 3: updating your VPS

This is the third part of our Plesk Tutorial Series. If you're configuring a new VPS we recommend starting with part 1.

Our pre-installed version of Plesk comes with CentOS 7 as the underlying operating system. CentOS 7 makes standard use of older versions of software (though with recent security updates) because it prefers stability over new features.

Plesk automatically installs updates and is delivered completely up-to-date. In addition, Plesk supplies many of their own packages that are geared to the use of Plesk. This means that (at the time of writing) PHP 5.4.16, 5.6.35, 7.0.29, 7.1.16 and 7.2.4 have already been pre-installed on your VPS for example (MySQL is behind, but we are updating this below). You manage these software (packages) from Plesk.

No further action is required for the update process on your part and we therefore focus on the following things in this part:

  • Adjusting the PHP version & settings
  • Adjusting the SQL database version
  • Plesk's automatic updates
  • Manually checking for updates

Perform all steps that involve code as root user, or user with sudo rights, unless indicated otherwise.

Changing the PHP version and settings

The PHP version defaults to 5.4.16 (the default configuration of CentOS 7) and is adjusted per domain as follows:

 

Step 1

Log in to Plesk and navigate to 'Websites & Domains' > 'PHP Settings'.

plesk websites and domains php settings


 

Step 2

Change the PHP version to a version of your choice and at the bottom of the page click on 'Apply'> 'Ok'.

plesk domain php settings

You are free to adjust the PHP settings on this page. However, we recommend that you leave / turn PHP-FPM via  Nginx and not use FastCGI as FPM is faster. Additionally, as of Plesk 17.8 PHP-FPM with Nginx new caching mechanics are introduced. These mechanics will provide a significant performance gain for the loading of your websites' static objects and reduce CPU usage.


 

Step 3

You may have noticed that some hard limits have been set, such as a Memory Limit of 128MB. Many CMS systems need more memory. To adjust this, go to 'Tools & Settings'> 'PHP Settings'.

plesk tools and settings php settings


 

Step 4

You will see an overview of the PHP handlers (a handler is a function that performs a specific task). Click on the number that you set under step 2.

plesk php settings and handlers


 

Step 5

Click on the 'php.ini' tab. You will now see an overview of PHP settings for your selected PHP handler. Look for the hardcoded limit you want to look up (for example ctrl + f > memory_limit = 128M) and adjust the limit to the desired value. Then click on 'Ok'

plesk php performance settings

If you now return to 'Websites & Domains' > 'PHP Settings' you can adjust the value of the customized option. Note that you have to enter this manually (in this example the memory_limit to 512M, though for most websites 128MB or 256MB is sufficient). Then click on 'Apply' to process the changes.

plesk php performance settings

Updating the SQL database

Plesk uses the MySQL service that comes with the OS. In the case of CentOS 7 (with which our Plesk images are supplied), this means that, at the time of writing, your VPS comes with MariaDB 5.5.56. In this manual we will update MariaDB to 10.2. MariaDB 10.2 largely corresponds to MySQL 5.7 (see this page for similarities and differences).


Step 1

Connect to your VPS via SSH or your VPS console. If you are using a new Plesk installation, go to Step 2. With an existing VPS, first back up your database using the command:

plesk db dump --all-databases > /var/backup/backup.sql

You're welcome to change the location and file name. Should your desired directory not exist yet, you can use the mkdir command, for example:

mkdir /var/backup

 

Step 2

Next, stop MariaDB:

systemctl stop mariadb

 

Step 3

Navigate to the MariaDB repository setup page and select the (Stable) version you want to use. Then copy the content under 'Here is your custom MariaDB YUM repositotry entry' to /etc/yum.repos.d/MariaDB.repo. For example, for MariaDB 10.2 this looks like this:

nano /etc/yum.repos.d/MariaDB.repo

 

Step 4

Then paste the copied content so that the file you just opened looks like this:

# MariaDB 10.2 CentOS repository list - created 2018-04-09 13:03 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.2/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1


Step 5

Your VPS now knows where to get the installation files for the new version of MariaDB. Install the new version of MariaDB with the command:

yum update mariadb

 

Step 6

Next, start MariaDB again with the command:

systemctl start mysql

As an extra check you can check the version of MySQL that is used with the command:

mysql -V
Plesk automatic updates

Updates are meant to give your VPS more stability, better functionality and security. Plesk updates are performed automatically (usually during the evening) and include the following components by default:

  • Plesk packages and services developed by Plesk (e.g. Plesk Health Monitor and Plesk extensions).
  • Packages of your operating system
  • Third-party components such as MySQL, PHP, etc.

The settings of the automatic updates can be found under 'Tools & Settings'> 'Update & Upgrade Settings'.

plesk update and upgrade settings

You will then see the overview below of the update settings. A complete overview of all packages that are automatically updated can be found under the 'All Packages' tab. There are + - 900 packages at the time of writing.

plesk system updates and settings

You may have noticed that under 'General' the option 'Automatically install system package updates' is turned off and may wonder what the differences are between the Plesk updates and the system package updates.

  • The Plesk updates include Plesk packages and services developed by Plesk (e.g. Plesk Health Monitor and Plesk extensions). Optionally you can also install third-party components such as PHP, Apache and Dovecot along. This option is on by default.
  • The system package updates include all packages for your operating system, but also the above mentioned third-party components.
Updating Plesk manually

Plesk itself and components that do not fall under automatic updates (e.g., new PHP interpreter versions, Webalizer, etc.) can only be manually updated from Plesk using the steps below. We advise you to check this with some regularity and to keep your VPS up-to-date as much as possible.

Step 1

In Plesk go to 'Tools & Settings'> 'Updates and Upgrades'.

plesk updates and upgrades


 

Step 2

If there are updates available, you will see an orange exclamation mark 'Component updates are available'. Click on 'Update Components' at the top right.

plesk update components


 

Step 3

Select the components you want to update (usually all) and click on 'Continue'.

plesk update products and components

Please note that the components you see may differ from those in the example above.

 


 

Your VPS is now not only safe, but also completely up-to-date and you're ready to link a domain! Click here to continue to Part 4: Linking Domains and Subdomains.

 

Should you have any questions left regarding this article, do not hesitate to contact our support department. You can reach them via the ‘Contact Us’ button at the bottom of this page.

If you want to discuss this article with other users, please leave a message under 'Comments'.

 

Do you have a good idea?

Give us your idea! If it's popular we'll add it to the wishlist!

Has this article been helpful?

Create an account or log in to leave a rating.

Comments

Create an account or log in to be able to leave a comment.

Are you stuck?

Ask one of our specialists to assist you

Contact us