The new WP Import tool allows users to import post, post images, author and tag or category data from their WordPress site into Publii. The process is relatively quick and simple, but may be a little confusing at first for users that haven't made use of WordPress' backup features in the past. In this guide, we'll cover how to backup and import your WordPress site content into Publii from start to finish.
There are two parts to any import process; first, we need to create the backup of our WordPress site content, and then we need to import this content into Publii.
Backing up your WordPress site
You will likely hear WordPress backup files referred to as WXR (WordPress Extended RSS) files, but this is just a name given to an .xml file that is formatted in a manner that WordPress can use for backup and restore. So how do we get our WordPress content into a WXR file? Thankfully, every WordPress installation already includes the Export option, which will be more than enough for our needs.
To export your WordPress content, just follow these steps:
- Log-in to your WordPress site's dashboard and click on the Tools → Export option in the left sidebar. This will open the Export page, where we can specify parameters for our export file.
- Publii will automatically pull the content it can use (that is, the post, author, and category or tag content) from the complete backup, so on this page we just need to make sure that the All content option is selected. If you only want specific posts to be exported, you can use the more advanced Posts option and set which categories, authors or date ranges to pull from.
- Once you've set the content you want to export, click on the Download Export File button. The backup XML file will be created, and you will be able to save it to your local computer.
Now that we have the backup file for your site, it's time to add it to your Publii site.
Importing your WordPress content into Publii
It will only take a few moments to import your content to Publii; just follow these steps:
- Open the site you want to import your WordPress content to in Publii. Then, click on the Tools option in the left sidebar to open the list of tools, then click the WP Import option.
- The tool has only a single option at first; Please select WXR file, where we'll need to specify the backup XML we downloaded in the last section. Click on the field to open the file explorer, and navigate to and select your downloaded XML backup file.
- Once the file has been selected, the Import tool will automatically verify the file to make sure that it is actually an WXR file, and provide details on the content. A new section will appear showing the number of posts, images, tags, categories and authors included in the WXR file.
- Now we need to make a decision; under the data breakdown section you will see a new option; Used taxonomy for posts. In WordPress, there are both Tags and Categories that can be assigned to posts, but Publii uses its own Tags system to categorize posts. You can choose for Publii to import either your WordPress tags OR categories, which will be converted to Publii tags and the imported posts assigned to whichever tag/category they were associated with on your WordPress site.
- Next, we can choose what to do with your WordPress authors in the Post authors option. Choose either to assign all imported posts to your main Publii author, or to import the authors from your WordPress site and assign their posts to them.
- When you've chosen how to handle your categories and authors, click the Import Data option at the bottom of the section to start the import process. You'll see messages detailing each element that is being imported, as well as the download of any images associated with the posts. Wait for a short while until this process completes.
- When the import is complete a pop-up message will appear confirming the import was successful, along with a link to the Regenerate thumbnails tool. It is highly recommended that you click this option and regenerate your thumbnails so that your imported post images match the site layout correctly; it only takes a few moments (unless you've downloaded a huge number of images!).
With the thumbnails regenerated, your content is now ready to use in Publii!
Note: As the WP Import tool is in an experimental phase, there may be some bugs or other issues with functionality of the site. If you encounter any issues, please let us know about it on our Community Hub.