How to move the vhosts directory in Plesk

Plesk-LogoThe default directory for all web files in Plesk on Linux is /var/www/vhosts. Usually this works well, but if you’d like to use another partition instead, you’ll be pleased to hear that you can!

Parallels (or Odin as we call them now) have written a handy script which moves the content and patches the relevant configuration file and copies all content at the same time. The script is called transvhosts and you can download it here:

  • http://kb.odin.com/en/1186

Download it using wget and make the file executable:

It’s a PERL script, which means it needs prefixed with ‘perl’ to be called. Say you want to move your vhosts directory to /home/vhosts, you’d call it like this:

This may take a moment or two depending on the amount of content you have in the current directory. The script will patch Plesk’s configuration file and restart the panel. There’s minimal downtime in involved in this process.

  • http://kb.odin.com/en/1186
  • http://kb.odin.com/en/111283

Jay is the CEO and founder of WP Hosting, a boutique style managed WordPress hosting and support service. He has been working with Plesk since version 9 and is a qualified Parallels Automation Professional. In his spare time he likes to develop iOS apps and WordPress plugins, or draw on tablet devices. He blogs about his coding journey at http://wpguru.co.uk and http://pinkstone.co.uk.

3 thoughts on “How to move the vhosts directory in Plesk

Add your voice!