After migration all bricks template gone

Hi there,
I was trying to migrate from subdomain to main domain but bricks layouts were not showing. Then I ran this command in sql:

UPDATE wp_options SET option_value = replace(option_value, ‘staging.example.com’, ‘example.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET post_content = replace(post_content, ‘staging.example.com’, ‘example.com’);
UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘staging.example.com’, ‘example.com’);

After that all my posts layout, pages layout are gone it is showing under templates but when I click view nothing is there.

Please Help!! Urgent!!!

I would upload the database again if you still have it in the state before importing.

All you need to do is change the home URL and site URL and then in the dashboard go to settings >> permalinks and click the “save changes” button to make sure you have no problems.

You can also put this in your wp-config.php without modifying the database.

define( ‘WP_HOME’, ‘http://example.com’ );
define( ‘WP_SITEURL’, ‘http://example.com’ );

I dont have the DB. But I have an old backup I might try that

@timmse Please help. I really need help about this

Hi Muhbassir,
I’m sorry that something went wrong after your database operations. The following simple rule always applies to such interventions, regardless of using a builder or not:

:bangbang: Make a database backup beforehand! Always! It’s only two or three clicks away :bangbang:

As I’m not a mysql expert, I can’t tell you exactly how you can undo your operations (that’s usually what the backup is for).

I always use the search/replace script mentioned here, with which I have never had any problems. However, I always make a backup beforehand: