Support » Localhost Installs » Re-Usable blocks not working after export to Local site

  • I have exported a “live” site version 5.9.5 under PHP 7.3.3 using the WP Export function, and selecting “All Content”.

    I imported the resulting WXR (.xml) file to a Local site version 6.1.1 PHP 7.3.5.

    All seems well, except that none of my re-usable blocks are working.

    The message is “Block has been deleted or is unavailable.”

    So I decided to export the blocks separately from the live site via the Gutenberg editor, under “More tools & options icon”, and then “Manage All Reusable Blocks”, to the Local site.

    The blocks are now available to use on the local site, but the messages on the Pages and Posts still tell me “Block has been deleted or is unavailable.”

    I can of course edit all the pages with the newly imported blocks ok, but have I missed something?

    Why do the “live” reusable blocks not work in the new local environment?

Viewing 2 replies - 1 through 2 (of 2 total)
  • There may be a problem with the export file or import process. Reusable blocks are stored in the WordPress database, so if there was an issue with the export or import, it’s possible that the reusable blocks were not properly transferred to the local site.

    There are a few things you can try to troubleshoot this issue:

    1. Double-check that the export file is complete and not corrupted. You can try opening the file in a text editor to see if it looks correct.

    2. Make sure that you have imported the export file correctly. You can do this by going to the Tools > Import menu in the WordPress admin dashboard and selecting the WordPress option. Follow the prompts to import the export file.

    3. Make sure that the WordPress version and PHP version of the local site match the live site version. If there are discrepancies, it’s possible that the reusable blocks are not compatible with the local site.

    4. Try resetting the permalinks on the local site. You can do this by going to the Settings > Permalinks menu in the WordPress admin dashboard and clicking the “Save Changes” button. This will reset the permalinks, which may help resolve any issues with the reusable blocks.

    If none of these suggestions help, there may be a more complex issue causing the problem. In that case, you may need further assistance from a developer or the WordPress support team.

    Thread Starter moascarman

    (@moascarman)

    Thank you for helpful ideas.

    Yes: the export file looks fine. It starts and ends elegantly.

    The import was fine: everything else works on the Local site. but not the re-usable blocks

    I reset the permalinks as you suggested, I did not alter anything, just pressed “Save Changes”

    The WordPress and PHP versions currently do not match. I understand this need, but will leave this for now, just to ask two more questions if you can help on them.

    1. I presume when I did my export, checking the “All Content” button, this would have included all of these which are separately listed on the Export page: Posts, Pages,Styles,Form Actions,GDPR Cookie Consent,Media.

    2. Do you happen to have a code snippet relating to reusable blocks (generally) which I should look for in the Local site sql file? Beecause I cannot see there anything which might relate to re-usable blocks`

    Thanks if you can help further

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.