First, please download these files. You will use them shortly.
Static vs Database-Driven Sites
Moving a site made up of static HTML files is an easy task, involving a simple copy operation. It’s typically enough to just move the project folder to another computer or another server.
Moving a database-driven site, on the other hand, is more complex. Just moving your WordPress installation folder by copying the installation folder is not sufficient. All you will do is break things.
This exercise will show you two different ways to do that task:
- using the import / export method built into WordPress
- using an excellent plugin called Duplicator
First, please watch these videos at my Loom.com repository. Please watch them in the order specified in their titles.
Then please try both methods of moving a site.
Import / Export
Videos 1 & 2 show how to export the textual content from a site.
In the folder of files you download above, there are two subfolders: FromDevelopmentEnvironment and FromLiveSite. Each of these subfolders contains an XML file exported from a site (one hosted in mamp, one live).
Make two empty WordPress sites in your htdocs folder: this will require a new database for each.
Use the following foldernames for each site:
- development_site_transfer
- live_site_transfer
Important: set the active theme to any “twenty” theme other than twenty twenty-four.
Using the procedures described in video two, please import first the development site into your empty WordPress site in the development_site_transfer folder. For this import, DO NOT include the attachments, since they are on my computer and you don’t have network access to my hard drive.
(Attachments are typically images, but they can also be other things like PDFs, zips, or locally hosted video—anything that is in the media library).
Then import the live site into the empty WordPress site in the live_site_transfer folder. In this case, DO include the attachments. Depending on your connection, it will likely a number of minutes for the images to download.
If you are prompted about whether you want to import the users of the original site, say “yes” (or assign their content to you).
Once you have the site content downloaded, take two screenshots showing of the two sites, showing the entire browser window, including the URL field:
- the browser window, showing as much of the front page as possible, and the URL of the development_site_transfer site.
- the browser window, showing as much of the front page as possible, and the URL of the live_site_transfer site.
Note: there WILL NOT BE images in the first site screenshot, but there WILL BE images in the second site screenshot.
Duplicator Method
Finally, install the Duplicator plugin into the most recent site you’ve built in this class (for example, the Gutenberg blocks exercise, or maybe the Canada exercise). How to do so is explained in the first part of video 3.
Then using video 3 as your guide, make a Duplicator package of that site.
Then using video 4 (and the last minute or so of video 3) as your guide, install that Duplicator package in your development environment.
Make sure that the URL of your moved site is
localhost:8888/firstduplicatedsite
(If you’re on Windows, you might not see the 8888).
When done, take a screenshot of as much of the home page as possible. Make sure that the screenshot shows the URL.
What to Hand In
Three screenshots (make sure that each shows the URL). Name them like this:
- transferred_dev_site
- transferred_live_site
- duplicated_site
NOTE: you don’t need to make full page screenshots: they just need to show the url and some of the home page content (enough to show a successful transfer of the content).
Put the screenshots in a folder called siteduplication-yourfullname, them zip the folder and hand it in.