Knowledge Base
Change URL on Website via phpMyAdmin or WP-config.php
A Domain Name is the forefront of your online brand. If it does not serve its purpose, you can always change it. For WordPress sites, there are several ways to change URL. This article will show two ways - via phpMyAdmin and wp-config.php file.
Important: Before making any changes, please make sure to back up your website first.
Change URL via phpMyAdmin
Here’s a step-by-step guide to change URL via phpMyAdmin.
- Log in to your cPanel.
- On the Home page, click Databases or the [ v ] arrow symbol. Then, click the phpMyAdmin option.
- On phpMyAdmin interface, select the database you to manage on the left side panel.
- Under Table column, select wp_options from the list.
- Under option_name column, look for siteurl, and click Edit on its far left corner.
- Enter your new URL in option_value.
- Click the Go button.
- Go back to option_name, look for home, and click Edit on its far left corner. Enter your new URL in option_value. Then, click Go
Change URL via WP-config.php
Here’s a step-by-step guide to change URL via wp-config.php file.
- Log in to your cPanel.
- On the Home page, click Files icon, or the [ v ] arrow symbol. Then, click Files Manager option.
- Select the public_html folder, then right click on wp-config.php file and click on Edit option.
- A code editor will display, just click Edit.
- Insert the following lines before // **MySQL settings – You can get this info from your web host **//:
define('WP_HOME','http://newURL.com'); define('WP_SITEURL','http://newURL.com');
Important: Replace http://newURL.com to your actual URL. - Click the Save Changes button.
Important: Changing the URL will not transfer site files automatically. You will have to transfer website files manually.
You’re all set! You’ve successfully configured your URL. If you need any further assistance or if you have any questions in changing your URL via phpMyAdmin or WP-config.php, please let us know. We’d love to help!
* Your feedback is too short