Articles in this section

How to change the default content for newly created domains in Plesk?

Plesk for Windows kb: how-to Plesk for Linux ABT: Group B

Applicable to:

  • Plesk for Windows
  • Plesk for Linux

Question

How to change the default content for newly created domains in Plesk?

Answer

Note: The solution is applicable by Plesk Administrators and Plesk resellers.

Click on a section to expand

Changing the default page via Plesk
  1. Download zip file, according to the installed version, which contains files of default website:
  • for Plesk Obsidian for Windows: Windows_skeleton_obsidian.zip
  • for Plesk Onyx for Windows : Windows_default_skeleton.zip
    1. Modify the files inside this zip file according to your needs (website files are located inside the /httpdocs directory). Adding extra directories is not supported.
    2. Once done, go to Plesk > Tools & Settings > Virtual Host Template:

      Screenshot_2019-03-12_Tools_Settings_-_Plesk_Onyx_17_8_11.png

    3. Click Browse... (or Choose File) > Select the modified zip file > Click Send File:

      Screenshot_2019-03-12_Plesk_Onyx_17_8_11.png

Changing the default page via SSH & RDP
  • Modify the Default Virtual Host Templates:
    1. Connect to the Plesk server via SSH/RDP
    2. Modify the default template content inside the following directory:
      • On Linux: /var/www/vhosts/.skel/0/httpdocs/
      • On Windows Server (just paste this path in Windows Explorer to open): %plesk_vhosts%.skel\0\httpdocs\
  • Create or modify the Virtual Host Template for a Reseller:
    1. Connect to the Plesk server via SSH/RDP
    2. In Windows, start a command prompt as an Administrator
    3. Extract the Reseller ID with the following command:

      # plesk db "select id, cname, pname from clients where type='reseller'"

    4. Copy the default template folder with ID 0 with the Reseller ID. For example, if the Reseller ID is 2:
      • On Linux: Copy /var/www/vhosts/.skel/0 folder to /var/www/vhosts/.skel/2
      • On Windows Server: Copy %plesk_vhosts%.skel\0 folder to %plesk_vhosts%.skel\2
    5. Modify the Reseller template content inside the Reseller template directories. According to the example shown in step 4:
      • On Linux: /var/www/vhosts/.skel/2/httpdocs/
      • On Windows Server (just paste this path in Windows Explorer to open): %plesk_vhosts%.skel\2\httpdocs\

Additional Information

Was this article helpful?

Comments

1 comment
Date Votes
  • Thanks for this useful article.

    Is there a way to do that for a defined service plan? 

    0

Please sign in to leave a comment.