Some times you may need to change the URL of your WordPress website due to various reasons. No worries there are many ways you can do this.
Method 1: By Changing URL from General Settings
STEP 1. Go to Settings >> General option in your admin menu
STEP 2. Replace existing URL with your new URL in WordPress Address(URL) field and Site Address (URL) field and click save button
Method 2: By Updating Database
You can try this if you have access to your database.
STEP 1. Login to phpMyAdmin
STEP 2. Select your Database and select wp_options table (assuming you have wp_ as prefix)
STEP 3. Change URL see image below.
Method 3: By Editing wp-config.php file
IF you do not have access to admin dashboard, youcan also define the URL by updating wp-config.php file which can be found on root folder of your installation.
define('WP_HOME', 'https://new-example.com'); define('WP_SITEURL', 'https://new-example.com');
NOTE: Don’t forget to add HTTPS if your site has SSL
define('WP_HOME','https://new-example.com'); define('WP_SITEURL','https://new-example.com');
Leave a Reply