How to Change WordPress URLs in MySQL Database from phpMyAdmin | SeoNexus
Seonexus.
TRENDING
  • How To
  • Reviews
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • About
  • Privacy Policy
No Result
View All Result
  • How To
  • Reviews
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • About
  • Privacy Policy
SUBSCRIBE
  • How To
  • Reviews
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • About
  • Privacy Policy
No Result
View All Result
Seonexus.
No Result
View All Result

How to Change WordPress URLs in MySQL Database from phpMyAdmin

by Team Seonexus.
May 23, 2022
in Hosting, Reviews, Tutorials, Webhost, Websites, WordPress
0
How to Change WordPress URLs in MySQL Database from phpMyAdmin

WordPress relies on MySQL database to store all its data, including your website URL. So, if you wish to change your website address you need to update it in MySQL as well. You can follow this article and easily update your website address to a new one.

Figuring out what’s the Name of WordPress MySQL Database

WordPress stores the MySQL database name, username and their password in the wp-config.php file. You can find this file in your root file directory

Open wp-config.php and search for DB_NAME. The value of this parameter is your database name. You may also note down the username and password because phpMyAdmin might ask you to enter those depending on your hosting provider.

Changing WordPress URLs in MySQL Database using phpMyAdmin

To replace your current URL, follow these steps:

  1. Go to phpMyAdmin from your hosting control panel.
  2. The left panel lists all of your databases. Select the one connected to your WordPress site and head to the SQL tab.

Enter the following SQL query:

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’);

Note: Replace oldurl.com with your current WordPress address and newurl.com with your new WordPress address.

Press Go. You will see success messages along with the number of changed rows. Note that the number of rows will be different for each WordPress website.

The last thing we need to do is verify the changes. Open the wp_options table and check the option_value of siteurl and home. You should see your new URL.

If you get error messages and the queries are not executing, check your code for syntax errors and make sure you are using the correct table prefix.

Related

Related Posts

How to host your own private cloud storage like Google Drive
Tutorials

How to host your own private cloud storage like Google Drive

July 1, 2022
Host your static website for free on GitHub
Hosting

Host your static website for free on GitHub

June 22, 2022
Install Nginx Proxy Manager on Ubuntu Server 22.04
How To

Install Nginx Proxy Manager on Ubuntu Server 22.04

June 14, 2022
Easiest way to deploy a WordPress website on Web3
WordPress

Easiest way to deploy a WordPress website on Web3

May 18, 2022
Cloudflare R2 Object Storage is now available in open beta
Reviews

Cloudflare R2 Object Storage is now available in open beta

May 11, 2022
Shared Hosting vs VPS Hosting: What one is best for you?
Hosting

Shared Hosting vs VPS Hosting: What one is best for you?

May 7, 2022
Next Post
Install Nginx Proxy Manager on Ubuntu Server 22.04

Install Nginx Proxy Manager on Ubuntu Server 22.04

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Latest

How to host your own private cloud storage like Google Drive

Host your static website for free on GitHub

Install Nginx Proxy Manager on Ubuntu Server 22.04

How to Change WordPress URLs in MySQL Database from phpMyAdmin

Easiest way to deploy a WordPress website on Web3

Cloudflare R2 Object Storage is now available in open beta

     
           
  • About
  • Privacy & Policy
  • Contact
  • Sitemap

© 2021 Seonexus.

No Result
View All Result
  • How To
  • Reviews
  • SEO
  • Tutorials
  • WordPress
  • Contact
  • About
  • Privacy Policy

© 2021 Seonexus.