Daniel
Daniel

Reputation: 35684

duplicating modx revo install

I'd like to do some changes to a modx revo install through a staging subdomain, with a separate database. What's the easiest way of doing this? I've been battling with this for two days.

I'm trying a new install now and replacing content, components and database content

Upvotes: 2

Views: 459

Answers (2)

rogaldh
rogaldh

Reputation: 268

There is another method to solve this problem.

  1. Create new database & user for your sub site.
  2. There is nice github repo. There you can find MODX install script which runs via cli. You'll get a new installed version of MODX in the end.
  3. Install Vapor package from official repo to your old site. Then run vapor script from it via cli. It creates a new package with your whole site dump (You should check dependencies for xpdo objects in this script. For ex. you can copy all the stuff except users or anything else).
  4. After all copy new package to core/packages at new site and install it.

Dump is ready :)

Upvotes: 2

Dash Media
Dash Media

Reputation: 36

I end up moving/duplicating MODX sites between live and staging subdomains several times per week. Here's how I do it.

MySQL

  1. Create a new blank staging database
  2. Make sure you MySQL user can access the new databse
  3. Export/Backup your live database
  4. Import the backup to your new/staging database

Files

  1. Download the matching version of MODX from http://modx.com/download/previous-releases/ because you'll need the /setup/ directory (hopefully you didn't leave that on your server previously).
  2. Copy the entire content of the 'public_html or 'www' folder over to the staging subdomain folder. Don't forget the .htaccess file which is sometimes hidden.
  3. Upload the setup folder to your staging location on your server just like it would be found in a clean MODX install.
  4. Update the three config.core.php files from the top directory, /connectors/, and /manager/ to update the "MODX_CORE_PATH" to the correct directory for staging.
  5. Update the 'core/config/config.inc.php' file. You'll need to update the database details and every instance of your directory structure to match the new staging location.

Run Setup

  1. Run by going to staging.domain.com/setup

If you get ant errors during setup it probably means that you missed something that needed updating in one of the inc.php files.

It's actually very similar to moving the site from one server to another except duplicating to a subdomain on the same server instead. MODX has instructions for moving to a new server at http://rtfm.modx.com/revolution/2.x/administering-your-site/moving-your-site-to-a-new-server

Upvotes: 2

Related Questions