• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

WPB and staging site

dave-ha

Regular Pleskian
I followed this guide to set up a WPB website on a staging site (subdomain) and published it to the production environment. I now see that the WPB sitemap contains the URLs of the subdomain. Is this intended?

What is the recommended practice for turning a subdomain directory with a WPB site into the regular httpdocs directory?
 
Hi there!

As I can see "staging site" in Plesk it's not a some automation, but just recommendations for workflow. You have a separate location on the server where you can update and test a copy of the site before copying it into production.
WPB does not know anything about site state (staging or production), therefore all links are generated regarding current domain name at time of publication. There a few absolute links, almost all of them are relative. So you can easily copy your WPB site to another domain and it will work correctly excepting some things like sitemap.xml. You should correct all your absolute links by hands (I think you can use find&replace).

But I'm not sure that correctly understand why you needed in such workflow for WPB site. Could you explain reasons please?
 
Hi Egor,

Thank you for your advice.

I use this workflow in situations where a website already exists in the main directory httpdocs. So, I prepare the new site in a subdomain and in a directory such as httpdocs2.

Could you also tell me which links should be corrected manually besides the ones in sitemap.xml?
 
I'm not sure about WPB 11.0, but in WPB 11.5 I see that absolute links also used in "Search" module and "Commenting". I recommend you find all places with some "find in files" operation (try to use your domain as keyword).
 
Egor, I need your help again.

I copied all files and directories from the staging site (subdomain) to the main domain and corrected the links in sitemap.xml, as recommended.

Since I haven't found a way to reassign Web Presence Builder to the main domain I deleted the subdomain in Plesk. The Web Presence Builder link then appeared next to the main domain at https://(example.com):8443/smb/web/sitebuilder-site-select/, as I had wished for. However, when launched, WPB does not recognise the existing files and asks to choose the website topic.

Question:
- How can I make the copied site reappear in WPB?
- After copying the files to the main domain and changing the root directory of the main domain back to httpdocs, what is the correct procedure to reassign WPB to the main domain?
 
WPB and staging site not launching site for edit.

I have a question on this as well. I also copied a site to a staging site with a subdomain. Now when I launch WPB from the subdomain it wants to build a new site and not want to bring up the site so I can edit it.

WPB woks fine with the main domain, and I can make edits. However while the site is live I want to make edits on the staging site and use WPB to make those changes.

Example ..
domain.tld < site built with WPB and works fine
staging.domain.tld < Site Copied from Panel - WPB will launch but does not bring up the site for edit - I have to start over and create a new site.


Michael J.
 
Question:
- How can I make the copied site reappear in WPB?
I have a bad news for you - unfortunately it's not possible. Published site does not contain sources for WPB site. One thing that can help - it's snapshots which placed at "data/snapshots". Are any snapshot exists in your site directory?

- After copying the files to the main domain and changing the root directory of the main domain back to httpdocs, what is the correct procedure to reassign WPB to the main domain?
As I've told earlier WPB does not know anything about "staging" sites. To move site to another domain you can use "snapshots". Probably it's one possible solution for this scenario (without usage of server-side backups).
 
I have a question on this as well. I also copied a site to a staging site with a subdomain. Now when I launch WPB from the subdomain it wants to build a new site and not want to bring up the site so I can edit it.

WPB woks fine with the main domain, and I can make edits. However while the site is live I want to make edits on the staging site and use WPB to make those changes.

Example ..
domain.tld < site built with WPB and works fine
staging.domain.tld < Site Copied from Panel - WPB will launch but does not bring up the site for edit - I have to start over and create a new site.
WPB is seeing your stagging and production sites as different standalone sites. WPB does not know anything about "stagging" sites. It's a just workflow for you, workflow for "classic" web sites.
Probably you are not needed in "stagging" site for WPB, because all changes in WPB are not published immediately. They published once you clicked "publish" button only. Maybe "stagging" site for WPB it's over-engineering?
 
Egor, thanks for your advice.

One thing that can help - it's snapshots which placed at "data/snapshots". Are any snapshot exists in your site directory?

Yeah, snapshots do exist - that's good news! What is the procedure for this: Launch WPB, choose a topic, select the desired snapshot from the list and publish the site? Or is it necessary to copy the desired snapshots into the data/snapshots directory?

Maybe "stagging" site for WPB it's over-engineering?

I often see scenarios where a live web site (without WPB) should be replaced by a web site created with WPB. That is one of the standard redesign scenarios. With the staging site concept it can be done quite efficiently because it is all done online and with the same hosting. Incidentially, it's nice to bring more customers from other CMS to WPB. For a website redesign is there any better option than the staging site?
 
Yeah, snapshots do exist - that's good news! What is the procedure for this: Launch WPB, choose a topic, select the desired snapshot from the list and publish the site? Or is it necessary to copy the desired snapshots into the data/snapshots directory?

Cool! At first, please save copy of your snapshots somewhere locally. :)
Snapshot's filenames are coded with usage of internal site's id. It's like "0516a7bc07904650b520de8b93b94736.php".
So, the simple way that I see it's like:
1. Create WPB site at your new domain.
2. Save any snapshot (just to create file structure at "data/snapshots" directory).
3. Replace *.php snapshot file with the correct one.
4. Restore snapshot from WPB Editor.



I often see scenarios where a live web site (without WPB) should be replaced by a web site created with WPB. That is one of the standard redesign scenarios. With the staging site concept it can be done quite efficiently because it is all done online and with the same hosting. Incidentially, it's nice to bring more customers from other CMS to WPB. For a website redesign is there any better option than the staging site?
Ok, it's clear now. So, I think that better way for WPB sites is to move snapshot (through download/upload in the editor) and republish site at the new domain.
 
Cool! At first, please save copy of your snapshots somewhere locally.
Snapshot's filenames are coded with usage of internal site's id. It's like "0516a7bc07904650b520de8b93b94736.php".
So, the simple way that I see it's like:
1. Create WPB site at your new domain.
2. Save any snapshot (just to create file structure at "data/snapshots" directory).
3. Replace *.php snapshot file with the correct one.
4. Restore snapshot from WPB Editor.

Yipeeh, it worked! Since all files and snapshots had been copied to the new root directory: In step 3, instead I just replaced the content of the new snapshot list (*.xml) with the content from the old list.

Many thanks, Egor, for saving my customer's website ...and my day! ;-) It's a pleasure to work with you.
 
Back
Top