Importing Demo Data

One-Click Demo Importer

The demo importer allows you to import any of the demos seen on the demo site with one click. This is the easiest way to setup your theme because it will allow you to quickly edit everything instead of creating content from scratch. The demo data imports posts, pages, categories, media, widgets and menus. It will not overwrite your existing content.

Step 1: Go to Aardvark > Theme Setup and click the Import Demos tab.

Step 2: Select the demo you want to import by clicking the Import button below the demo thumbnail.

Step 3: You can choose to import a different variety of content e.g. posts, pages, menus, depending on the demo.

Step 4: To import BuddyPress data you can use the BuddyPress Demo Data plugin.

If your demo fails to import it’s usually because the PHP maximum execution time or memory limit are too low on your server and need to be increased.

Increase PHP Maximum Execution Time

If your demo import fails after loading for a little, you’ll need to increase it to at least 180 seconds to allow the import to complete.

There are two ways you can fix this error. The first method is to fix it manually by editing your .htaccess file and the second method allows you to do the same thing with a plugin.

Method 1: Editing .htaccess File Manually

Access the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel where your .htaccess is located. If you can’t find it, then look at this article on why you can’t find the .htaccess file and how to find it.

Next, add this line to your .htaccess file:

php_value max_execution_time 180

This code sets the value for maximum execution time to 180 seconds. If you still get the error, try increasing the value to 600.

Method 2: Using A Plugin

If you don’t wish to edit .htaccess file manually, then you can install and activate the WP Maximum Execution Time Exceeded plugin. That’s all. The plugin works out of the box and increases the maximum execution time to 300 seconds.

Increase PHP Memory Limit

Access the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel where your .wp-config.php is located.

Next you need to paste this code in wp-config.php file just before the line that says “That’s all, stop editing! Happy blogging.”

define( 'WP_MEMORY_LIMIT', '256M' );

This code tells WordPress to increase the PHP memory limit to 256MB. Once you are done, you need to save your changes and upload your wp-config.php file back to your server. You can now visit your WordPress site and memory exhausted error should disappear now.

Note: If this solution does not work for you, then this means your web hosting service provider does not allow WordPress to increase PHP memory limit. You will need to ask your web hosting provider to increase your PHP memory limit manually.

Limit the number of cores using MAGICK_THREAD_LIMIT

In certain versions of ImageMagick there is a problem when trying to import the demo images and the system becomes extremely slow. This causes the demo importer to never complete. You can use a workaround to fix this as follows:

Access the root of your WordPress installation (located in the same folder as your /wp-content/ and /wp-admin/ directories) using an FTP client or file manager in your web hosting control panel where your .htaccess is located. If you can’t find it, then look at this article on why you can’t find the .htaccess file and how to find it.

Next, add this line to your .htaccess file:

SetEnv MAGICK_THREAD_LIMIT 1

This code limits the number of cores using MAGICK_THREAD_LIMIT which is used when uploading the demo images.

Every time you import the menus with a demo these will be added in addition to all your current menu items. If you do this multiple time the number of menu items can quickly build up so it is recommended you uncheck the Import Menus option on subsequent demo imports.

If you want to remove the imported menu items go to Appearance > Menus and manually delete the duplicated links. You can quickly remove them using the Quick remove menu item plugin.

If you want to remove all the demo data you imported there are two ways to do this:

Method 1: WordPress Reset plugin: This plugin is the fastest way to get rid of content. However, it will remove all posts, pages, menus, images, widget data, theme options, etc. from your website, not just the demo data. It does not remove plugins, but will deactivate them. Only use this plugin if you are able to start over.

Method 2: Manual removal: This method will take longer and simply involves manually deleting all of imported posts, pages, menus, images etc.

Manual Import

If the one-click demo importer is not working for you, you can import the demo data manually. The demo files are located at aardvark/lib/framework/theme-setup/importer/demo-files/

Once in the demo-files folder you’ll see folders for each of the theme demos. Within each demo folder you’ll see one or more of the following:

  • pages.xml – imports the demo pages
  • posts.xml – imports the demo posts
  • products.xml – imports the WooCommerce products
  • menus.xml – imports the demo menus
  • widgets.txt – imports widgets
  • sidebars.txt – imports cusotm sidebars
  • options.txt- imports the theme options

Importing Posts, Pages, Products and Menus

Step 1: Go to Tools > Import in your WordPress admin dashboard.

Step 2: Fnd the WordPress option and click Install Now (if it’s not already installed) or Run Importer.

Step 3: Click Choose File and then select the desired pages.xml file form the available demo folders.

Step 4: Click the Upload File and import button.

Step 5: Select the admin user from the dropdown menu check the Download and import file attachments option.

Step 6: Now do the same for the posts.xml, products.xml and menus.xml files if the demo contains them.

Importing Theme Options

Step 1: Open up the options.txt file in a text editor and copy all of the contents.

Step 2: Go to the Theme Options > Import/Export, and click the Import from File button.

Step 3: Paste the text file’s contents into the newly revealed textarea.

Step 4: Click the Save Changes button to import the theme options.

Importing Widgets

Step 1: Go to Plugins > Add New and search for “Widget Importer & Exporter” and install the activate the plugin.

Step 2: Go to Tools > Widget Settings Import and select the widgets.txt in the desired demo folder.

Step 3: Click Show Widget Settings and select the widgets you want to import.

Step 4: Click Import Widget Settings to import the widgets.