WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 30.10.2020 09:46:58

spyrou
Member

Duplicate a WBCE website

Hi!
I am interesting to know the process of duplicate a WBCE website(Clone it).
Is there any module for that? I am using a cPanel installation.

Thanks!

Offline

#2 30.10.2020 10:59:49

florian
Administrator

Re: Duplicate a WBCE website

Hi.
The most easy way is to use the backup module, e.g. install the current version of the backup module so that it can be found at "Admin tools".

Then, use it to create a dump of the database (choose the 2nd option to save only the tables created by that WBCE installation) and save it on your local machine.  Create also a backup of the filesystem with the backup tool (this might take a while) and download it too.

Open the database dump with a plain text editor like Notepad++ and replace all occurances of the "old"/development URL with the URL of the target website and save. Then, use a tool like phpMyAdmin or Adminer to import the data into the database of the target webspace.

On the target webspace, uplodad the created zipfile into the root directory. Rename it to file.zip and create a unzip.php with the following code

<!doctype html>
<head>
<title>UnZip</title>

<body>
<?php
// assuming file.zip is in the same directory as the executing script.
$file = 'file.zip';

// get the absolute path to $file
$path = pathinfo(realpath($file), PATHINFO_DIRNAME);

$zip = new ZipArchive;
$res = $zip->open($file);
if ($res === TRUE) {
  // extract it to the path we determined above
  $zip->extractTo($path);
  $zip->close();
  echo "$file extracted to $path";
} else {
  echo "$file not found";
}
?>
</body>
</html>

Call the unzip.php in your browser.
If everything has worked, delete the zip file and the unzip.php via FTP.

Last step: Open the config.php via FTP for editing and change the database connection information and the WB_URL value to the current needs.

Sounds complicated, but can be done in a few minutes if one has a bit practice with that.

Last edited by florian (30.10.2020 11:01:48)


Nicht ärgern. Nur wundern.

Offline

Liked by:

spyrou

#3 30.10.2020 16:51:59

losttrip
Member

Re: Duplicate a WBCE website

spyrou wrote:

Hi!
I am interesting to know the process of duplicate a WBCE website(Clone it).
Is there any module for that? I am using a cPanel installation.

Thanks!

Do you have a local development website, which you want to move to a live server?
Do you have a live site, which you want to move to a new location?
What exactly are you trying to achieve?

Online

#4 30.10.2020 18:40:33

spyrou
Member

Re: Duplicate a WBCE website

No I want just to duplicate it for a speed reason to create something very similar to initial one with 99% same content!
I am using cPanel hosting server and Softaculous Apps Installer.

Thanks!

Offline

#5 30.10.2020 18:41:26

spyrou
Member

Re: Duplicate a WBCE website

Thank you Florian for your help!!!

Offline

Liked by:

florian

#6 05.01.2021 01:02:18

makdev
Member

Re: Duplicate a WBCE website

florian, hope you are well.
In the last year I have migrated WBCE sites between 4 different servers with no problems.
But now I have a problem.
The Pages do not seem to migrate well.
I see the pages files are there in the file structure, but my backend says 0 Pages.

I have tried this to and from local server and from site to staging on 2 different remote web servers (different hosting providers)
The pages do not seem to register.

I followed your directions as well as a manual unzip of files and replacement of config.php as I used to do before this problem strted. (FYI, See process description at end of post)

Please advise (please let me know if you require temporary access to backend, ftp and sql server)

Thank you in advance

- - - - - FYI, WBCE migration process - - - - -
    1. Install WBCE on target server (Site B)
    2. Rename (backup) "config.php" on site B
    3. Copy files from source site A to target site B
    4. Replace "config.php" from source site A with "config.php" for target site B
        a. (Alternatively, omit config.php in file backup from source Site A)
    5. Export DB for site A (custom export with drop table)
    6. Import DB on site B
Testrun site
- - - - - END PROCESS - - - - -

Offline

#7 05.01.2021 08:18:49

florian
Administrator

Re: Duplicate a WBCE website

The process description is the old fashioned way. Actually there's no reason to install WBCE on the target system before copying the files from the source system there.
I have posted above a way to use the files from the latest backup admin tool for copying sites.

In your case: please check if the given database prefix in the config.php fits to the needed database prefix. E.g. if you have installed a blank WBCE on the target system and used the default prefix wbce_, but your source website uses (for example) wbce2021_, you will have exactly the described error as result (a "working" website with no pages in the backend).

The access files in the /pages directory do not store the information. You can restore a website from the database, but not from the file system.

Last edited by florian (05.01.2021 08:19:34)


Nicht ärgern. Nur wundern.

Offline

#8 11.11.2022 13:38:07

mikejd
Member

Re: Duplicate a WBCE website

Just a hypothetical question:
Could a similar process be used to migrate a WB site to WBCE?

Download an sql file for the WB database and import into WBCE database? Perhaps that is a bit simplistic, but as an idea?

Offline

#9 11.11.2022 14:37:15

florian
Administrator

Re: Duplicate a WBCE website

Hm, one would have to check if the WB tables correspond with the WBCE tables.
Then, only the content significant tables have to be exported/imported, i.e. pages, sections, and the tables from the modules where the content is stored (mod_wysiwyg etc.). The more different modules where used, the more complicated this will become.
Probably some fixes to the table structure have to be performed manually (e.g. when modules require tables which do not exist in the export), and last but not least the accessfiles have to be generated (what can be done with the System Information admin tool).


Nicht ärgern. Nur wundern.

Offline

#10 11.11.2022 14:52:24

mrbaseman
Developer

Re: Duplicate a WBCE website

Spontaneously I would have said that the modules aren't a big problem, if they work on both platforms, but it's not that easy. The modules also refer to section IDs and page IDs and for several modules there exist different forks for WB and WBCE.

I have always tried to keep the same code work on both, but now that they have moved the wbmailer again in a different way than it was done here already years ago, I have to add another case in the mpform code (and I'm not sure how it should look like).  By the way, mpform allows to export forms and import them again, even if the page_id and section_id are different. Unfortunately the submissions can only be exported, but that might perhaps be ok...

Ah, and by the way, here we have a fixed phplib which should be php8.1 ready :-)

Offline

Board footer

up