
How to Change & Update WordPress URLs in the Database when Site is Moved to a New Server
Change & Update WordPress URLs – So you are moving your WordPress site to a new server. Be sure to change and update your site’s URLs in the database. Here is how you can do that:
First, make sure you have a new database selected. Now, run SQL update and replacement commands on the tables, particularly, wp_options, wp_posts, and wp_postmeta.
Use the below codes in order to swap in your old URLs with the new ones.
Note:
- Avoid trailing slashes
- If necessary, change the table prefix values wherever applicable, i.e., wp_xxx
All right, let’s see the codes:
UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldurl’, ‘http://www.newurl’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldurl’,’http://www.newurl’);
UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldurl’, ‘http://www.newurl’);
UPDATE wp_postmeta SET meta_value = replace(meta_value,’http://www.oldurl’,’http://www.newurl’);
Did the above codes worked for you? Need further assistance?
If you have any sort of problem with your WordPress site like Change & Update WordPress URLs while moving site to new location, kindly contact our WordPress developers at https://www.conceptinfoway.net/contact-us/.
Concept Infoway is a leading WordPress development company in India from where you can hire an expert WordPress developer or a team of WordPress programmers at affordable rates. Hire our WordPress resources for:
- WordPress Website Development
- WordPress CMS Development
- WordPress Ecommerce Development (WooCommerce Development)
- WordPress Blog Development
- WordPress Plugin Development & Customization
- WordPress Theme Development & Customization
- WordPress Migration & Upgradation
- WordPress Maintenance & Support
To discover more about our WordPress development services, visit https://www.conceptinfoway.net/technology/wordpress-development-company-in-india/.
Table of Contents
Categories
- Android App Development6
- App Store Optimization2
- Apple Watch App Development8
- Asp Dot Net Boilerplate1
- ASP Dot Net Development26
- Asp Dot Net Zero1
- CakePHP Development1
- CMS Development6
- Codeigniter Development2
- CPANEL4
- CRM development2
- CRM Development India1
- Cross Platform App Development6
- Dedicated Development Centre1
- Dot Net Development28
- Drupal Web Development2
- Ecommerce Development13
- Google Panda 4.21
- Internet Marketing SEO5
- iOS App Development9
- iPhone App Development11
- Joomla Development3
- Mobile Application Development30
- My SQL Server3
- News62
- Open Source Development10
- PHP Development25
- Search Engine Optimization33
- Search Engine Optimization Service India20
- SEO India21
- Sharepoint Development2
- Social Media Optimization2
- Software Development11
- Swift Programming Language1
- Technology11
- Uncategorized12
- Web Design and Development20
- WordPress Customization8
- WordPress Development11

WooCommerce vs Shopify – What’s Good For Your eCommerce Website Development in India?
