Reasons why the layout of page builders and block content breaks after migration
- The reason why simply transferring the content of a page does not complete a home.
- Why does the visitor screen malfunction while the administrator screen remains functional?
- The causes of layout errors generally fall into four categories.
- The most common points where people get stuck when trying to fix things themselves.
- The order of restoration varies depending on the type of migration.
- Dividing the migration scope using LUX Content Migration.
- Frequently Asked Questions.
- WordPress-related links
When I opened the WordPress site after the migration, the content was intact, but the boxes, fonts, and spacing were all messed up, which was frustrating. The furniture had arrived at the new home, but it looked like the walls and lights had disappeared.
However, there are not many cases where an entire page is completely broken. In most cases, the connection between the URL used to create the page, the style files, the theme settings, and the block data is disrupted.
So, what should we check first?
The reason why simply transferring the content of a page does not complete a home.
Page builders and block content do not only store text. They also record where the content is placed, its width, its color, and its spacing.
WordPress blocks include comments within the database or HTML that mark the beginning and end of the block, and store the settings within in JSON format. In essence, a small instruction manual is embedded within the main content.
It is not only the content that is needed for the display. The block names, which start with “wp-block-…”, and the CSS files provided by the theme must also work together.
If even one of the instructions or the paint is missing, the appearance will change.
Why does the visitor screen malfunction while the administrator screen remains functional?
This issue is particularly noticeable immediately after a migration. In the administrator view, the editing screen appears normal, but in the visitor view, the font, images, and spacing can disappear all at once.
A typical example is a domain change. Elementor states that if the URL does not match after the site address changes, the editor may not function correctly, or custom fonts may not appear on the visitor’s screen.
If you are using a block theme, the scope of what you need to check becomes wider. This is because the header, footer, main content area, colors, fonts, and margins are each managed separately.
If only the main text is copied, even the same block can look like furniture from another house.
Even if the layout seems to be missing, the actual culprit may not be the content, but the address.
The causes of layout errors generally fall into four categories.
The first thing to suspect is not content loss. The new site has not yet found the old site’s conditions.
- If an old URL remains associated with a setting, image, or font, then…
- If the generated CSS is missing or has not been regenerated in a new environment, then…
- If the global color, font, width, or spacing of a theme has been changed.
- If the configuration data for blocks and page builders is not correctly restored during the migration process, then…
Especially, simply substituting characters in a URL is dangerous. This is because block settings are not just ordinary sentences that appear on the screen, but rather structured data.
The `search-replace` command in WP-CLI also has a specific `precise` option for handling complex serialized data, for the same reason. Changing the entire database without careful consideration can disrupt the structure of the settings.
Changing your address does not mean that the structure has also been safely changed.
The most common points where people get stuck when trying to fix things themselves.
Initially, it seems like the solution would be straightforward: change the address to a new domain and recreate the CSS. However, it is not easy to determine the extent of the changes needed, which CSS files are outdated, or whether cached versions of the old pages remain.
The image may be visible, but the font might be missing. Only one page might be corrupted. If the administrator screen and the visitor screen are different, you may need to check multiple pages and files to find the cause.
When a domain change and a server change occur simultaneously, the process becomes more complex. This is because not only the page builder, but also the versions of the theme and plugins, generated files, and global styles must all be compatible.
Simply replacing all URLs or regenerating only the CSS is not a universal solution.
If you change the incorrect range, a new error will occur. If the theme template is missing, the main content will not return to its original state, even if it is correct.
The most challenging aspect of working directly on a project is often not the actual modification, but rather defining the scope of the work. If the necessary changes are misjudged, it becomes necessary to compare the original data with the new site, and even small modifications can disrupt the layout of other pages.
Therefore, backing up data before any task is not an option, but a crucial safety measure. If you use WP-CLI, it is safer to first use the “dry-run” function to confirm the objects that will be affected, and then to select only the necessary tables for processing.
To safely divide the content, LUX Content Migration allows you to define the roles of the existing and new sites, and then select only the necessary posts, pages, categories, and media to be migrated. Before importing, you can check the number of new posts, comments, and required images, which creates a step for verifying the scope of the task.
After completing the import and if a problem is identified, you can delete newly created posts within the completed category or task to revert the state. However, this process manages the scope of the content import, so address substitutions and CSS regeneration must be checked separately using the procedures described earlier.
If a problem is corrected without knowing the cause, it can make recovery more difficult.
The order of restoration varies depending on the type of migration.
If you have only changed the domain, you must first update the address. After setting the WordPress Address and Site Address to the new domain, use the page builder’s URL replacement function and recreate the files and data.
Next, clear the cache and verify the main pages from the visitor’s perspective. Do not assume that the recovery is complete simply because the editor indicates that it is normal.
Domain changes are verified starting with the URL.
If you have only moved the server and the domain is the same, before checking for URL replacement, first check the generated CSS, data regeneration, and cache, and the existence of image and font files. You should also verify that the theme and plugin versions are the same as the original.
When making server changes, the process begins by examining the generated files and the cache.
If you have changed the block theme, do not just move the main content. To reproduce the header and footer, screen width, and spacing, you must also migrate the theme’s template, template parts, and global styles.
Theme changes must also consider the template and global styles.
Do not discard the original site until a new screen appears and functions correctly. Restoring the layout is more like re-establishing a broken connection than finding a lost home.
The order of restoration steps varies depending on the type of move.
Dividing the migration scope using LUX Content Migration.
To separate content from screen conditions during layout restoration, you must first determine what to move. LUX Content Migration exports selected posts, pages, categories, and media from the existing site to dedicated files, and then adds these posts, pages, comments, authors, and media to the new site. You can verify the number of newly created posts, comments, and necessary images using category-based import and previews, and you can also delete the newly created posts from the completed task to revert the changes.
When migrating site settings, you can apply general settings, reading settings, comments, permalinks, widget placement, and menu structure separately. This feature is responsible for migrating content and specified site settings, so if the display is broken, you need to check the theme template, global styles, and the generated CSS and data of the page builder. In other words, after defining the scope of the migration using the migration tool, the address and the conditions for creating the display are checked as separate recovery procedures.
Frequently Asked Questions.
Q. Why is only the layout broken, even though the content of the post is the same?
A. This is because the data that populates the main content and layout, and the CSS that styles it, operate separately. If even one of the following is incorrect – the URL, the generated CSS, the theme-wide styles, or the block settings – the content will remain, but the appearance will change.
Q. What should I check first on my website?
A. If you only changed the domain, check the WordPress Address and Site Address, the URL of the page builder, then the generated files and cache. If you only moved the server, first check the generated CSS, cache, image files, font files, and the versions of themes and plugins. If you also changed the block theme, check the templates and global styles as well.
Q. Can this problem be easily solved using a tool? What kind of tool should be used?
A. You can use the URL replacement and CSS/data regeneration features provided by the page builder. For large-scale address changes, use a search and replace tool that allows you to preview the results before execution, and ensure that it has a function for safely handling serialized data.
Q. Does the layout also get restored using only the content migration tool?
A. It is difficult to say that it can be restored in one go.
LUX Content Migration transfers posts, pages, comments, authors, media, and general, reading, comment, permalink, widget, and menu settings. Therefore, the theme template, global styles, and page builder’s generated CSS must be checked separately. The preview function before migration and the rollback function after completion are used to check and adjust the scope of the content migration.