- In your hosting admin panel, go to phpMyAdmin and select your site’s database.
- Click on the “SQL” tab and execute the following query, replacing the old domain name with the new one (note that there should be no slash at the end of the address, and the protocol should be http, not httpS):
UPDATE wp_options SET option_value = REPLACE(option_value, 'http://old_domain.com', 'http://new_domain.com') WHERE option_name = 'home' OR option_name = 'siteurl'; - Go to your site’s admin panel and go to the “Settings – General” page.
- In the “WordPress Address” and “Blog Address” fields, enter the URL of the new domain and confirm the changes by clicking the “Update Options” button.
- If it is not possible to perform steps 3-4, then execute the following two requests one after the other, replacing http://old_domain.com with the new site address (note that there should be no slash (the “/” character) at the end of the address):
UPDATE wp_posts SET guid = REPLACE(guid, 'http://old_domain.com', 'http://new_domain.com');
UPDATE wp_posts SET post_content = REPLACE(post_content, 'http://old_domain.com', 'http://new_domain.com')
We don’t just build websites and custom solutions for our clients — we also develop our own products. This is the focus of our R&D division – Same Te Labs