Here we would like to show two way to import demo content. Some case one-click demo import does not work in your server then manual import definitely works at your site. You can either start building your site from scratch or import one of our demo sites and then modify it to fit your needs. We will now explain how to do the latter.
One-Click Demo Content Importer:
At materia theme, we implement one-click demo importer. So at here just choose what layout you want to include then import it. For import content with one-click follow this step-
- Login to your WordPress site
- Check all required plugins/extension are installed
- Go to Appearance > Demo Content. Interface like this –
- Select which demo you want to import. We have 30+ homepage content. so here you can choose and click on import buttons.
- After that wait a couple of minutes, then you will get all content imported as well as your website is ready
- Done, yay! You can start building your website by changing demo contents or use some parts for your work.
One-click demo importer interface –
Manually Importing Demo Content by Uploading XML Files:
- Log into your Wordpress Dashboard and click on Tools > Import.
- Next click on WordPress.
- Next, choose a file from your computer and click on Upload file and Import.
- If you also want to import demo images then check Download and import file attachments checkbox.
- Next click on Submit.
- After data is imported go to Appearance > Menus.
- Then assign the “Primary menu” menu to the “Primary menu”.
- Next go to Administration > Settings > Reading panel
- Set Front page displays: to a static page and chooses the Home page for Frontpage.
- Save changes
Import demo via WP-CLI
WP-CLI commands:
wp ocdi list
– Which will list any predefined demo imports currently active theme might have,wp ocdi import
– which has a few options that you can use to import the things you want (content/widgets/customizer/predefined demos). Let’s look at these options below.
wp ocdi import options:
wp ocdi import [–content=] [–widgets=] [–customizer=] [–predefined=]--content=<file>
– will run the content import with the WP import file specified in the<file>
parameter,--widgets=<file>
– will run the widgets import with the widgets import file specified in the<file>
parameter,--customizer=<file>
– will run the customizer settings import with the customizer import file specified in the<file>
parameter,--predefined=<index>
– will run the theme predefined import with the index of the predefined import in the<index>
parameter (you can use thewp ocdi list
command to check which index is used for each predefined demo import)
The content, widgets and customizer options can be mixed and used at the same time. If the predefined
option is set, then it will ignore all other options and import the predefined demo data.