[How to] How to restore a Web Presence Builder site from a snapshot located in a domain

Refers to:

  • Plesk Sitebuilder 4.5 for Linux
  • Plesk for Linux
  • Web Presence Builder for Linux
  • Plesk 11.0 for Windows
  • Plesk 12.5 for Windows


2016-11-16 12:44:16 UTC


2016-12-21 19:05:47 UTC


Was this article helpful?

Have more questions?

Submit a request

[How to] How to restore a Web Presence Builder site from a snapshot located in a domain


Content management was enabled for the domain testdom.com . The site existed in Web Presence Builder and was published to the domain.

The site was accidentally removed from Web Presence Builder (WPB) by clicking on either More > Start Over or More > Remove Site :

Is it possible to restore the site from the domain testdom.com ?


The site can be restored from a snapshot located in the /data/snapshots directory of the domain where it was published.

When you create a new site for the domain, old snapshots are not shown in Web Presence Builder, even if the files exist in the file system. This is because the name of the main XML file contains the ID of the old site. To show old snapshots for new sites, it is necessary to rename the XML file:

1) Check snapshots:

~# ll /var/www/vhosts/testdom.com/httpdocs/data/snapshots/
total 252
-rw-r--r-- 1 testcust psacln 223 Jul 1 13:34 03a21c5dbeaf22159bc109374638f61f_list.xml
-rw-r--r-- 1 testcust psacln 250139 Jul 1 13:34 3b395edf0050931a8632de93a4d3085a.php

Here, 03a21c5dbeaf22159bc109374638f61f is the ID of the old site that was published to the domain testdom.com .

2) Create a new instance of the WPB site for the domain testdom.com through Parallels Plesk:

Subscriptions > testdom.com > Manage hosting (or "Open in Control Panel" for Plesk 10.4) > Launch Web Presence Builder > Edit in Web Presence Builder

3) Define the Site ID by the name of the Plesk domain :

mysql> select d.name as 'Plesk Domain', s.uuid as 'Site uuid', s.site_id as 'Site ID' from psa.domains d, psa.dom_param dp, sitebuilder5.site s where d.id=dp.dom_id and dp.param='site_builder_site_id' and s.uuid=dp.val and d.name='testdom.com'"
| Plesk Domain | Site uuid | Site ID |
| testdom.com | d116751c-458c-5179-3f57-142135a67b3c | 172bc09617fa3dcafded8e53377097d5 |

4) Rename the XML file to make it fit the new Site ID:

~# mv /var/www/vhosts/testdom.mom/httpdocs/data/snapshots/03a21c5dbeaf22159bc109374638f61f_list.xml /var/www/vhosts/testdom.mom/httpdocs/data/snapshots/172bc09617fa3dcafded8e53377097d5_list.xml

5) Refresh the page with the new site instance. Snapshots should be shown on the "Revert" page. As soon as they are available in WPB, you can restore them by clicking "Load."

The method is the same in Parallels Operations Automation (POA), with the only difference being publishing the location path.

NOTE: After the snapshot is restored, there may be an additional issues with site images because they have the old location paths in the WPB database. As a result, they may not be visible in the restored site.

To solve this, re-upload the images or change the paths in the database:

~# mysqldump --disable-extended-insert  sitebuilder5 > sb_backup.sql
~# grep "03a21c5dbeaf22159bc109374638f61f" sb_backup.sql|grep widget_property
INSERT INTO `widget_property` VALUES (570,462,'content','<p><img id=\\"mce-548\\" style=\\"float: left; margin-right: 20px;\\" title=\\"helloworld\\" src=\\"/sitebuilder/sites/03/03a21c5dbeaf22159bc109374638f61f/attachments/Image/helloworld.jpg\\" alt=\\"helloworld\\" width=\\"1631\\" height=\\"743\\" /></p>');

Find the strings with the old paths and replace them with the new values. For example, change /sitebuilder/sites/03/03a21c5dbeaf22159bc109374638f61f /attachments/Image/helloworld.jpg to /sitebuilder/sites/17/172bc09617fa3dcafded8e53377097d5/attachments/Image/helloworld.jpg .

Have more questions? Submit a request
Please sign in to leave a comment.