This article shows three methods for changing a WordPress Address/URL.
- Using WP Admin
- Using WP Config
- Directly in the database
When you move a WordPress website to a new URL/address you need to tell WordPress, don’t worry it’s easy. Check each of the following methods in order, to see which is applicable to your situation.
Method 1: WP Admin
This method is best done prior to moving WordPress.
Updating the records using WP Admin is the easiest method, is often not possible. If you’ve already moved WordPress to its new address you won’t have access to WP Admin. If this is the case, skip ahead to the next method.
- Login to WordPress
- WP Admin -> Settings -> General Settings
- Edit the fields – WordPress Address (URL) & Site Address (URL)
Note: After hitting save you will no longer have access to WordPress at its previous address.
Method 2: WP Config
This method is easy but it will require FTP access to your websites file system.
- Connect via FTP
- Insert or edit them if they already exist
Method 3: Directly in the database
Use this method if the previous methods aren’t possible or have failed. Writing directly to the database is dangerous and should be done with caution, carefully do only what’s explained in this tutorial.
- Backup database in cPanel (before making any changes)
- Access phpMyAdmin from cPanel
- Select your database from the left sidebar
- Select your wp_options table (the prefix may differ)
- Edit the siteurl and home entries to reflect your new URL