Md Toy Blog

Wordpress copy dev to live website (Duplicator)

Sat Jan 05 2019 00:00:00 GMT+0000 (Coordinated Universal Time)

  1. Copy login credentials from both websites (found in wp-config.php) It's a good idea to keep a copy of wp-config.php from both your websites somewhere safe. You will use that information for connecting to the database later
    • dev
    • live (production)
  2. Go to the dev version of your website. And create a backup:
  3. Duplicator > Create Package
    • Follow the instructions (you can skip some of the filter notices and click next) It's a good idea to change the image filenames anyway (remove spaces and diacritics), but you can do that another time
    • You will arrive at a success screen where you are allowed to One click download, but don't do it (it takes forever)
  4. Access the live (production) version's filesystem to delete all wordpress related files It seems like the commands are run synchronously and serially one after the other waiting for completion
  • If you use FTP it takes forever for each command to delete each file (or so I believe)
  • Prefer using Web FTP Client (there is less latency)
  1. Connect to your dev FTP and move the archive…zip and installer…php files to the root of your live/production server If both are on the same server, it will be done in a second, otherwise, download the archive from live server and upload to the dev server
  • On your dev server the archive…zip and installer…php files are in /wordpressroot/wp-snapshots/
  1. IMPORTANT : if you are using Wordfence, delete the .user.ini file in the production server as well, it will create errors.
  2. Go the https://<yourlivewebsitedomain>.com/installer...php
  • The ... should be replace with all the gibberish numbers and letters in the installer filename
  • Press enter and follow the step in the installer
  1. While installing you will be asked the credentials for the live/production server database.
  • You will overwrite any existing content on that database, so proceed with care and backup if necessary.
  1. Once you are done with the installer, Login to your Wp Admin.
  • You should be prompted that the installation files were correctly deleted.
    • Anyways make sure the archive…zip and installer…php are not in your hosting root directory anymore
  1. You are done.
  2. Every time you make changes, make them on to the dev website, and repeat this process.