How to modify the associated domain of WordPress from the database

How to modify the associated domain of WordPress from the database

When we modify the site URL of our WordPress installation, the website may load incorrectly — the theme or stylesheet may not load, we may not be able to access the administrator area, etc.
 
This happens because, at the time of installing WordPress, the current path is stored in the database.
 
To modify the paths of our installation, we must manage the WordPress database as follows.
 
We access phpMyAdmin of our hosting account.
http://domain.com/phpMyAdmin (replace domain.com with your domain).
 
Select the database of your installation. If you only have one database, it will be automatically selected:
 
 
Enter the "wp_options" table:
 
 
Edit the "siteurl" field. It is usually located on page 1 with the value (column "option_id") 1 or 3:
 
 
Also edit the "home" field. It is usually located on page 1 with the value (column "option_id") 1 or 2:
 
 
Once the changes are made, save them.
 
In some cases, images in the "uploads" folder may not be indexed correctly. If they do not display properly, you can install the "Better Search and Replace" plugin or Duplicator to correct the image paths.
 
It is possible that after making the changes, the website still appears the same. This is because you are viewing cached content stored in your browser. To fix this, you only need to clear your browser cache .
The easiest way to do this is by pressing the keys "Ctrl+F5" simultaneously. This should allow you to view the website correctly.
 
 
For more information, you can  contact us.
    • Related Articles

    • How to duplicate our website to another hosting with Wordpress Duplicator

      It is very common to want to duplicate a website to a completely different hosting account, either because you want to continue developing it from the new hosting or because you want to create a copy of the site and have it respond under a different ...
    • How to modify the associated domain of WordPress from wp-admin

      In this guide, we will show how to modify the domain associated with your WordPress from /wp-admin, that is, from your WordPress admin panel. Your administration folder does not necessarily have to be called /wp-admin, but by default this is the name ...
    • How to modify the Magento associated domain

      When we modify the site of our Magento installation, the website loads incorrectly. This happens because, at the time we installed Magento, the current path was registered. To modify the paths of our installation, we need to manage the Magento ...
    • How to modify the Moodle associated domain

      When we modify the site of our Moodle installation, the website loads incorrectly and we cannot access it. This happens because, at the time of installing Moodle, the current path is recorded. To modify the paths, we need to edit the Moodle ...
    • How to modify the associated domain of the Prestashop

      When we modify the site of our PrestaShop installation, the website loads incorrectly, the template or stylesheet does not load, we cannot access the admin panel, etc. This happens because, at the time of installing our PrestaShop, the current path ...