WBCE CMS Forum

WBCE CMS – Way Better Content Editing.

You are not logged in.

#1 30.10.2020 08: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 09: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 10:01:48)

Offline

Liked by:

spyrou

#3 30.10.2020 15: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?

Offline

#4 30.10.2020 17: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 17:41:26

spyrou
Member

Re: Duplicate a WBCE website

Thank you Florian for your help!!!

Offline

Liked by:

florian

#6 05.01.2021 00: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 07: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 07:19:34)

Offline

Board footer

Powered by FluxBB

up