If you want to change or update your WordPress website’s default address, domain name, WordPress Address or URL with have any reason.
You can change it by following Four different methods without breaking the website’s links. No matter if you are just want to change your website’s address or trying to repair or resolve a problem.
Note:- Always keep a backup of your website before you proceed further.
Method No. 1
Change your Website’s and WordPress address “URL” in MySQL databases which is PhpMyAdmin
- Access cPanel
- Search for PhpMyAdmin. (If you have more then one Website then you should be very clear which one is the database you have to edit, or you can check Databases one by one related to your site you want to edit)
- Click on database and find PhpMyAdmin wp_options Table.
- Now you have to edit.
Method No. 2
You can change your site’s URL by Editing your wp-config.php file. Access your Website’s main Directory either with FTP Client or cPanel.
- Find the wp-config.php file.
- open wp-config.php file and find the lines like:
Replace the above addresses “example.com” to yours before you save the changes to your file.
You May Also Like: What Is XML-RPC and How to Stop DDoS Attacks on your WordPress website
You can change your Website’s URL by editing your active Theme’s “functions.php”. This is not recommended for beginners so I will not show the details about this method. it can possibly be complicated and different according to individual conditions. If you make any mistake when editing function.php files, your site can be down and you will need a professional to fix it.
Info:- Function.php file is located in http://www.example.com/wp-content/themes/your-active-theme/function.php. You can edit this file in cPanel or with a theme editor plugin.
you can easily change your Website’s URLs with the help of a plugin named Velvet Blues Update URLs. Although there are lots of plugins you can find for this purpose but this one is very stable allows you to change URLs on your entire WordPress installation.
This plugin is also very helpful if you are going to transferring from one domain to another domain. Because you can change all your image attachment URLs easily and quickly.
Thanks For Reading