• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question How to change the MySQL and web directory in Plesk for Linux??

speed2

New Pleskian
how to change the MySQL and web directory in Plesk for Linux?

My idea is to have the database on one disk and the Web on another, I have already changed the mail directory, setting in the file /etc/psa/psa.conf.

Disk1 = SO Done

Disk2 = Database

Disk3 = Web

Disk4 = Mail Done
 
Directory for vhosts you can change with transvosts.pl utility:

Code:
# plesk bin transvhosts.pl --help
You should specify destination directory.
Utility to transfer vhosts content from HTTPD_VHOSTS_D directory to new place.

Usage:
        --dest-dir   <path>  Destination path. Path to new vhosts directory.
                             Example: /path/to/new/vhosts.
                             If directory does not exist it will be created.

        --correct-scripts    Changes user scripts.
                             Old vhost path is replaced to new path in content of all files.
 
I created a symbolic link pointing to another disk.

Exemple:

systemctl stop mariadb.service

mv /var/lib/mysql /diskmysql/


ln -s /diskmysql/ /var/lib/mysql

vim /etc/my.cnf
[mysqld]
...
datadir=/diskmysql
socket=/diskmysql/mysql.sock
symbolic-links=1


systemctl start mariadb.service
 
You can move the vhost directory tree, but not a single directory of that only. Here is a detailed description how to move the vhost tree:
 
Back
Top