Phone
+852 6339 2326
Work Hours
Monday to Friday: 9AM - 6PM
In case you change from staging site to live site, the site URL in the database is pointing to a different site URL value, this results in your website could not access. The below method shows you how to access the database and edit the record via the command line.
At first, you need to have access to the database via the command line, and at least you need to know your database username and password.
mysql -u username -p
show databases;
use wordpressdb;
SELECT option_name, option_value FROM wp_options where option_id=1
SELECT option_name, option_value FROM wp_options where option_id=2
UPDATE wp_options SET option_value = replace(option_value, 'oldurl.com', 'newurl.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'oldurl.com','newurl.com');
UPDATE wp_posts SET post_content = replace(post_content, 'oldurl.com', 'newurl.com');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'oldurl.com','newurl.com');
Update the values
UPDATE wp_options SET option_value = "http://yourstie.url" WHERE option_id=1
UPDATE wp_options SET option_value = "http://yourstie.url" WHERE option_id=2
after gaining access to the system, then use elementor > Tools > Replace URL to replace the old URL to the most updated one.