NO BUG: Where are the templates stored?

When migrating the site, I lost a complex main page template, which is quite difficult to restore :roll_eyes:

I would like to find it, but I don’t understand how these templates are stored in Bricks.

During the transfer, a copy of all files and a database dump were made, which were then re-uploaded to the server. All the data and settings were saved, but one template for the main page was completely gone.

How can it be restored?

Thanks so much for your report!

To answer your question: All template-relevant data is stored in wp_postmeta.

However, it would be much easier if you export the missing template from the original installation and then import it into the new installation. This saves you from any operations on the database, which might lead to more issues.

It is possible that the affected template contains some errors, so it was skipped during the migration. Without specific details, however, I can only guess.

Best regards,

In the database dump (backup copy before migration), when searching for the template ID, I found such an entry

Will it be possible to restore the template from this data? If I understood correctly, this is a revision.

After the transfer, the test site was deleted from the server. I didn’t expect to encounter such a problem. At first I thought that the template had just detached itself from the page. It was created separately as an individual. But then it turned out that it was just empty.

Now, if you repeat the full restoration of the site, I think that the situation will repeat itself and the template from the dump will not load. So that it can then be transferred via import/export.

I figured it out. Yes, I found the template myself, which is on the screenshot. I inserted it into the desired wp_postmeta field, removed the shielding and everything worked.

1 Like

I’m glad you were able to solve your problem!