It’s time to go through the procedure of changing your WordPress URL after looking at the many reasons why you would wish to. Fortunately, there are a few approaches that work.
- How to change the WordPress URL in all scenarios?
- Handling outdated links and URLs is a crucial last step.
How to change the WordPress URL in all scenarios?
Method 1: Modify your WordPress dashboard’s URL.
Before diving into anything more technical, it is advisable to concentrate on this approach. You could discover that switching from a subfolder or changing the address entirely requires changing your WordPress URL in the admin panel.
Select Settings > General from the WordPress dashboard.
The following fields can be found:
WordPress Contact (URL)
Domain Name (URL)
Users may access the main blog or website through the WordPress Address.
The Site Address identifies where your site file is located.
Both of these fields ought to be the same in most circumstances.
You can update these fields if you currently own the domain and need to switch from a temporary domain or something you already selected.
After altering these URLs, ensure to clear the cache on your website. Only the new URLs in these fields will lead to your website.
Method 2: Use the wp-config.personal home page record
A WordPress online website can also have a hardcoded URL in the wp-config.personal home page record. In short, the hardcoded URL in the wp-config.personal home page record overrides something in the Settings module.
So, the following alternative is to regulate the WordPress URL to your wp-config.personal home page record.
We recommend using FTP or Files Transfer protocol to access your site’s files.
Once you have been linked with your server, open the wp-config. Hypertext Preprocessor file is usually placed at the foundation of your WordPress site.
Method 3: Modify the WordPress URL using the database
You may modify the WordPress URL right here in your website’s database. phpMyAdmin is used for this. The phpMyAdmin utility may be found in the cPanel or dashboard of your host.
A word of caution: If database updates are not made correctly, your site may break. We advise utilizing one of the other ways or hiring a developer if you don’t feel comfortable.
Go to phpMyAdmin and choose the database for your website from the list on the left. Although some websites may refer to it by a different name, it often ends in “_options.”
Keep in mind that due to this alteration, just the new URL will now direct users to your website.
Method 4: Change the WordPress URL with WP-CLI
If you’re an experienced developer, only finish this procedure. To carry out specified operations, command lines are used in the procedure.
Use the modify WP command to adjust the URL site values if you are a developer or if you hired one.
What will happen to your articles’ previous page URLs and links now that you’ve updated your WordPress URL? After going through this procedure, you’ll likely discover some broken links; thus, fixing them is crucial.
Head to Seahawk Media to gain more information on various WordPress-related topics.