Search the CLDY knowledge base

Updated on April 5, 2024

How to Update URLs for your WordPress Site?

There are different ways on how to change the URLs for your WordPress site, depending on which method you are more familiar with. 


Before you go ahead with the steps, take note that you need to change both the website URL and the WordPress URL. They always go hand in hand. While they are of different essence, they have to be of the same link for them to stay connected.


With that taken care of, here’s how you can change your WordPress URL in 4 ways:


1. From WordPress

On your WordPress dashboard, you should see a menu on the left side of your screen. Go to Settings.


You will see the following items that you will need to modify:
WordPress Address (URL)
Site Address (URL)


Usually, they are kept to the same web address to prevent confusion and ensure that all changes reflect right away to your website itself.


Once you’re done, click on Save Changes.



2. From cPanel – phpMyAdmin

Prior to making any changes, make sure you have a backup of your WordPress database.


Login to your cPanel dashboard. Under Database, select phpMyAdmin.



The phpMyAdmin page will now load. On the left side, you will see the name of your database, and a menu selection below. Select wp_options.
(By default, it will show this name. If you have changed your WP database, it will be this prefix with _options.)



The right side of your screen will load up showing this:



Click on the Edit icon beside siteurl and home. The page should now look like this:



Update the option_value text field with your desired URL. Before clicking on Go, make sure that Save and Go back to previous page is selected, to bring you back to the preceding page where you can click on Edit, this time for the home section. It should be the same process then to change the home URL.



3. Using FTP client – functions.php

For those who are more familiar with FTP workarounds, and also for those who cannot access the Settings page of WordPress, this is the recommended method.


Login to your cPanel account using FTP client. For these steps, we are using CoreFTP for Windows.


Under /public_html/your-wp-folder/wp-content/themes/your-wp-theme/, you should see this screen:



Right click on functions.php, and click on Edit.



Notepad (or your selected text editor) will now launch. Add these at the bottom of the text:


update_option( ‘siteurl’, ‘’ );
update_option( ‘home’, ‘’ );


Replace the URL with your preferred web address, and save your changes.



4. Using FTP client  – wp-config.php

If you cannot locate functions.php, this is the method we suggest. From /public-html/your-wp-folder/, look for wp-config.php.


Right-click and select Edit.



Your text editor will pop-up. Look for the text /* That’s all, stop editing! Happy publishing.*/. Paste the following text above this line:



When you’re done, save your changes.



After successfully changing the URL, always check on your new link to see if everything is working. You can always come back to the same steps to check which parts you may have missed, and you should be good to go.


Need assistance? Contact our support team here and they will be happy to lend a hand.

Still can't find what you're looking for?