Content of a site is what makes a website. It gives the identity of a website which gives information, inspiration and communication to site admin and visitors. If you are a site owner, it could be a hard task to build and establish the contents of your site. You might not want to launch your site with empty contents which makes it ugly and visitors will not opt to visit the site.
But do you know that if you are using WordPress as your content management software, it is easy to add dummy contents for your site dynamically? Using import method from WordPress, you can import a demo content from an XML file. Mostly, if you purchased a premium themes, it comes up with a demo XML file.
Import Demo XML Content
Importing a demo XML file is just easy. All you need to prepare is the WordPress importer plugin if you have not yet installed WordPress importer, and the XML file for upload. To start with, consider the following steps below.
- Install WordPress Importer. You can skip this step if you have already a WordPress Importer plugin installed to your site. To install, navigate to Tools Import WordPress. Click Install Now button as shown in the screenshot below.
- After installation click Run Importer. You will be redirected to Import WordPress page.
- Click Choose File to choose your XML demo file content for upload. To upload and import, click Upload file and import button as shown in the screenshot below which you will be redirected to Import WordPress Assign Authors.
- After you have been redirected to Assign Authors, you could use the default author or assign from existing user or create a new user with login name. You could opt to download and import attachment as well. After choosing your preferences, click Submit button.
- Wait for the importer to finish the import. In some cases, with a large file of import, errors could emerge due to its large amount of import. To prevent this, you must unchecked Download and import file attachments before submitting your preferences.
Deindex Everything Except Homepage
Importing WordPress XML file is a great way to add dummy content files to your site if you are starting to create a site. But be aware that if you site is already indexed to search engines like Google, you should deindex those dummy posts and pages because in search results, your site will oddly be indexed. To deindex those posts or pages, you can use a plugin like Yoast SEO or in some themes, there are embedded feature of deindexing, like ours. You can also use child themes to deindex your site. To deindex using child theme which only index the homepage, paste this code to the function.php file:
function wise_noindex_chosen() {
if(is_home()){
echo'<meta name="robots" content="index, follow">';
}
else {
echo '<meta name="robots" content="noindex, follow">';
}
}
add_action('wp_head','wise_noindex_chosen');
Conclusion
That’s it, the demo XML content is now imported and there are no worries that your site will be indexed by search engines oddly. In my experiences in importing demo XML content, like importing WordPress Theme Unit Test Data, mostly in my computer with slow internet connection, I am experiencing errors on it. As on the above instructions I have made, I just unchecked Download and import file attachments and it prevented me to encounter such errors but images are loaded through the internet. How about you do you experience some errors in importing demo XML content? Feel free to add your comments below.