Starter sites library import is not working
You are probably here because of the starter sites library not working for you. Below you will find a few tips that can make it work properly.
Note that these tips apply both for local WordPress installs and live sites.
- Checking that the sites library API is working properly
- Checking that the Permalinks are set up properly
- Checking that the Site Address is set up properly
- Making sure the authorization is not expired
- Missing php-xml extension
1. Checking the sites library API
The Starter Sites Library depends on the WordPress Rest API. If it is not working correctly, the chances are that the starter site import might not work as expected.
The easiest way to check if the API works fine is by going to your site address followed by /wp-json. For example, if your site address is https://example.com, you'd have to go to https://example.com/wp-json.
Two things can happen at this point:
1. If this page is not reachable, your best bet would be to contact your hosting provider and ask them to enable the REST API for your website.
2. If this page loads correctly, it should display some raw data about your website. Now that you've reached this point, you can hit CTRL+F (Cmd + F on a Mac) and search for ti-sites-lib. If nothing comes up at this point, you should refer to the second tip in this list.
2. Checking the Permalinks
One of the possible solutions would be to rewrite the Permalinks. You can easily do this by going to Settings > Permalinks inside your website's Dashboard.
Here, under Common Settings, you should make sure that the selected option is Post Name. If this is already the case, you should choose another option and hit Save. After that, you should reselect the Post Name option and hit the Save button again.
This action will make sure that your Permalinks are refreshed, possibly fixing any API issues.
3. Checking the Site Address
Sometimes, the starter sites library will throw an error that looks like the one below.
One of the recurring problems that we've seen on our clients' websites is an inconsistency between the Site Address and the WordPress Address.
You should make sure that these are correctly set up to the website's address. You can find these settings under Settings > General in your Dashboard.
In most cases, these should be the same. Beware, though, as if you change them improperly, you can lose access to your website.
4. Expired Authorization
If you spend too much time looking through the demos, the authorization for the import might expire. It's indicated to reload the page and try importing again if you were on the page for a long time.
5. Missing php-xml extension
Checkout this thread.