- Before I let you go to explore the wonderful world of WordPress on your own, let me show you one last thing. It has to do with copying content from one site to another. You see, now that you've created a site, there's a good chance at some point in the future, you may want to either move the content from that site to another site, to merge two sites together, or you may want to move the entire site from one location to another. This could be because, as I mentioned in the beginning, you've build the site locally on your computer and you want to migrate it to the web, or it could be because you have an existing wordpress.com site and you want to pull some of its content into your new site or you have another existing site that you want to move content from or move content to.
In the scenario where you want to move content, you have two main options. You can either just move the content, that would be an export/import function or you can duplicate the entire site in a new location. That would be WordPress migration. So let me show you the import/export function first. In my browser, I have our current site that we've been building throughout this course, wp.hplussport.com with all of its content, but then I decide, "I want to develop the site further, "maybe test out some new themes, test out some plugins, "but I don't want to do that live on the site, "because people might come to the site.
"Instead, I want to do it locally on my computer "and then experiment, and then once I get something I like, "I'll put it up on the live site." In that case, I need to copy all the content from this site over to my local computer. So here, I have a local install of WordPress. It's completely clean right now. This is what you get out of the box with WordPress. And now I need to move the content from the live site to my local site. To do so, I'm first going to go to the back end of my live site, go to the admin panel, go to Tools and Export.
From here, I can choose to either export all my content or just export posts or pages. And here's a tip: Always use All Content. For whatever reason, if you choose only Posts or only Pages, all of your images will not transport with it. So, use All Content, click Download Export File. WordPress will create an XML file which contains all the information to import the content. It's now sitting on my computer. Then I can go to the site I want to import the content to. In this case, the one that's on my computer, go to the back end, go to Tools.
and Import. From here, I get to choose from what source I'm going to import and in this case, that would be WordPress. When I select WordPress, I'm taken to the plugin installer that installs the WordPress Importer. I'll click Install Now to install the plugin. Then I need to activate the plugin and run the importer. So if you just activate the plugin, you can find the importer under Tools and Import. And from the Importer, I get to choose the file I just downloaded. So here it is: hplussport.wordpress, and the date. I'll click Upload file and import.
Then I need to choose who I want to assign these posts to because now I'm importing content so I need to save who created that content, so I can either create a new login name for this new content or I can select an existing user, so I'll select an existing user. And then very importantly, I will check this Import Attachments function. That means that WordPress will actually go online, find every single attachment that was uploaded to my live site and pull it into this new site. Once all the content is imported, I get this "All done. Have fun!" message that tells me everything worked and if I go to Posts, you'll see I now have all my posts.
If I go to Media, I have all my media items. And if I go to Pages, I have all my pages. However, if I go to the front end, I still have a bit of work to do. You'll notice that these tagline did not translate over, neither did any of my widgets and my theme configurations have not been transported over either. So now that I've moved the content, I need to set up my Customizer. So I'll go to the Customizer and go to Navigation and select the primary menu for Main Menu and Social Links Menu to Social Menu and click Save and Publish, and close.
So now I have the same layout. I also need to delete the Hello world! post and delete the sample page and do all that stuff, but you get the idea. I have copied over the contents from my site into the new site. Now there's one very important part here. You can only do this from a live site on the web to either a live site on the web or your local computer. You can't do the import function from your local computer to a live site on the web because your live site on the web can't make an HTTP request or a web request to your local computer to pull out all the files.
If you try to go from your local computer to live on the web using the export/import function, none of your images or other media will translate across. If that's the case, you want to duplicate your site from a local computer to live on the web or you want to make an exact duplicate of your site from one location on the web to another, I urge you to go check out this course instead: WordPress Plugins: Moving WordPress with WP Migrate DB. This course shows you how to use the WP Migrate DB and WP Migrate DB Pro plugins to do a complete site duplication from one location to another.
It's a really easy process, but it requires a couple of steps and you need to have full access to everything. It's actually a much simpler way of doing it than what I just showed you. However, it requires that you get the plugin and that you have access to all the little components and willing to do some database configuration in the process. So now you know how to move content between sites and also how to duplicate sites and you have all the information you need to set up, configure, and use your own WordPress site live to the web.
Note: This course covers an older version of WordPress, which features the Classic Editor. Watch this course only if you are using the Classic Editor plugin or using WordPress 4.9 or earlier. Otherwise, watch WordPress 5 Essential Training, which covers the new Block Editor experience.
- Creating posts and pages
- Formatting text
- Publishing and scheduling posts
- Adding images, audio, and video
- Bulk editing posts and pages
- Customizing themes and menus
- Using widgets
- Extending WordPress with plugins
- Editing users profiles
- Configuring settings
- Getting new readers
- Keeping WordPress up to date and secure