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
-
Download zip file, according to the installed version, which contains files of default website:
- for Plesk Obsidian for Linux: Linux_skeleton_obsidian.zip
-
for Plesk Onyx for Linux: Linux_default_skeleton.zip
- for Plesk Obsidian for Windows: Windows_skeleton_obsidian.zip
-
for Plesk Onyx for Windows : Windows_default_skeleton.zip
-
Modify the files inside this zip file according to your needs (website files are located inside the
/httpdocs
directory). -
Once done, go to Plesk > Tools & Settings > Virtual Host Template:
-
Click Browse... (or Choose File) > Select the modified zip file > Click Send File:
-
Modify the Default Virtual Host Templates:
-
Create or modify the Virtual Host Template for a Reseller:
-
In Windows, start a command prompt as an Administrator
-
Extract the Reseller ID with the following command:
# plesk db "select id, cname, pname from clients where type='reseller'"
-
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
-
-
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\
-
Comments
4 comments
What I just found out: It seems that not all of the files of the default skeleton are used when you create a subdomain: For instance, the error_docs are not copied into the newly created folder while cgi-bin is. This seems inconsistent and should be fixed!
Hi @b_p,
The "error_docs" and "cgi_bin" folders are copied from the template only during the subscription/new webspace creation
When the subdomain is created, it belongs to the existing subscription/webspace and thus, only "httpdocs" and "conf" directories are copied
I added folders "tmp" and "session" in the default skeleton (same level as cgi-bin, error_docs, etcetera). Why does Plesk not add them with newly created webhostings?
Need them there for special purpose.
How can i activate this?
Hi Tedoc Web Management. all additional folders should be placed to "
webspace" folder, so it is like:
/var/www/vhosts/.skel/0/webspace/tmp
See documentation for details:
https://docs.plesk.com/en-US/obsidian/administrator-guide/71983/
Please sign in to leave a comment.