Ever wished you could give your WordPress site a fresh start with a new URL? Maybe you’re rebranding, moving to a better domain, or simply correcting a spelling mistake. Whatever the reason, changing your site’s URL can feel daunting, but it’s an important step to keep your online presence professional and accessible.
In this article, you’ll discover clear, step-by-step instructions for safely updating your WordPress site’s URL, plus helpful tips to ensure a smooth transition.
Related Video
How to Change the URL of Your WordPress Site: A Step-by-Step Guide
Changing your WordPress site URL can sound like a daunting task, but it’s sometimes necessary. Maybe you’re moving to a new domain, switching from HTTP to HTTPS, or just updating your site structure for better SEO. Whatever your reason, making this change properly helps maintain your website’s integrity and avoids issues like broken links or lost visitors.
In this guide, we’ll walk you through the different methods to safely and effectively change your WordPress site URL. We’ll also cover practical tips, share best practices, explain challenges, and answer common questions at the end.
Understanding WordPress URLs: Site Address vs. WordPress Address
Before diving in, let’s clarify the two main types of URLs you might encounter in WordPress:
- WordPress Address (URL): This is where your WordPress core files live.
- Site Address (URL): This is the address visitors enter in their browser to reach your website.
Most of the time, these are the same. Sometimes, they’re different—such as when you install WordPress in a subdirectory (e.g., example.com/wordpress).
Why Change Your WordPress Site URL?
Changing your site URL may be needed for several reasons:
- Rebranding or switching to a new domain.
- Moving from a staging to a live site.
- Upgrading from HTTP to HTTPS for security.
- Changing the directory where WordPress is installed.
- Correcting accidental installation on the wrong domain or sub-folder.
Making this change correctly ensures your site keeps running smoothly and retains its SEO ranking.
How to Change Your WordPress Site URL: 4 Reliable Methods
There’s more than one way to change your WordPress site URL. Let’s break down the four most common (and effective) methods:
1. Change Site URL via WordPress Dashboard (Admin Settings)
This is the easiest method—no coding required.
Steps:
- Login to your WordPress admin dashboard.
- Go to Settings > General.
- Locate the fields for WordPress Address (URL) and Site Address (URL).
- Enter your new desired URL in both fields.
- Scroll down and click Save Changes.
Note: If you can’t access your dashboard, or if you see greyed-out fields, skip to the next methods.
2. Update the URL in wp-config.php
This is handy if you’re locked out of your WordPress dashboard.
Steps:
- Use an FTP client or your hosting control panel’s File Manager to access your site files.
- Locate the file named
wp-config.php
in the main WordPress directory. - Download a backup before making changes.
- Open
wp-config.php
in a text editor. - Add the following lines, replacing
https://yournewurl.com
with your actual new URL:
php
define('WP_HOME','https://yournewurl.com');
define('WP_SITEURL','https://yournewurl.com'); - Save the file and upload it back to your server.
Tip: This will override the settings in the WordPress dashboard, making the fields uneditable until you remove these lines.
3. Change the URL Directly in the Database (Using phpMyAdmin)
This method gives you the most control, especially if other methods fail.
Warning: Always back up your database before making changes.
Steps:
- Login to your web hosting control panel and open phpMyAdmin.
- Locate your WordPress database and click to open it.
- Find the
wp_options
table (the prefix may be different, likeyourprefix_options
). - In the table, look for the rows named
siteurl
andhome
. - Click “Edit” next to each, and update the URLs to your new address.
- Save your changes.
Extra step: If you’re moving domains, run a search and replace on your database for any hard-coded URLs inside posts, pages, or options.
4. Use a WordPress Plugin
Several plugins can help you change your site URLs and update internal links. These are ideal for bulk changes or migrations.
Popular Plugins:
– Better Search Replace
– Velvet Blues Update URLs
– All-in-One WP Migration
How to Use:
- Install and activate your chosen plugin.
- Follow the plugin’s instructions to update URLs across your site.
- Take special care with options to update GUIDs or serialized data.
Additional Steps After Changing Your Site URL
Changing your WordPress URL isn’t always a one-and-done process. Here are crucial steps to keep everything running smoothly:
1. Update Your Permalinks
- Go to Settings > Permalinks.
- Click Save Changes to regenerate your .htaccess file and update link structures.
2. Fix Mixed Content Issues (When Switching to HTTPS)
- If you moved from HTTP to HTTPS, you may see browser warnings about “mixed content”.
- Update hard-coded internal links and media URLs to use
https://
. - Plugins can help (like “Really Simple SSL”).
3. Redirect Old URLs
- Set up 301 redirects from the old domain to the new one to preserve SEO and avoid broken links.
- Many hosts or plugins allow you to manage redirects easily.
4. Update Search Engines and Analytics
- Update your site address in services like Google Search Console and Google Analytics to ensure proper tracking.
- Submit a new sitemap if you changed domains.
5. Update Backups, API Keys, and Integrations
- Double-check automated backups—ensure they point to the correct address.
- Update API keys or external integrations (e.g., CDN, payment gateways) with your new URL.
Benefits and Challenges of Changing Your WordPress URL
Benefits
- Improved Branding: Reflect a new business name or focus.
- Better Security: Move to HTTPS for safer browsing.
- SEO Optimization: Use a more keyword-friendly or location-based URL.
- Professionalism: Present a cleaner, more memorable web address.
Common Challenges
- Broken Links: Forgetting to update all internal links can lead to 404 errors.
- SEO Risks: Not setting up proper redirects can harm rankings.
- Theme or Plugin Issues: Hard-coded URLs in custom themes or plugins may not update automatically.
- Cache and CDN Problems: Old versions of your site may stick around until caches are cleared.
Best Practices and Expert Tips
- Backup First: Always back up your files and database before making changes.
- Test Before Going Live: Use a staging site for trial runs if possible.
- Check Everything: After the change, navigate your site and test forms, links, and media.
- Clear Caches: Purge browser, plugin, and CDN caches to avoid display issues.
- Notify Your Audience: If you’re changing your domain, inform users via email and social media.
Frequently Asked Questions (FAQs)
1. Can I change my WordPress URL without losing my SEO?
Yes. To preserve SEO, always set up 301 redirects from your old URLs to your new ones, update your sitemap, and inform Google Search Console of the change. This way, search engines know your site has moved and pass ranking signals to the new URL.
2. Is it safe to change my WordPress URL if my website is already live?
It’s safe if you follow the correct steps: back up your site, update URLs everywhere (including widgets and menus), and set up redirects. However, mistakes like missing redirects or broken links can temporarily disrupt your site, so approach carefully.
3. What happens if I enter the wrong URL and get locked out of my site?
Don’t panic! You can regain access by editing the wp-config.php
file or by changing the site URL directly in the database with phpMyAdmin. Once you correct the URL, your login should work again.
4. Do I need a plugin to change my site URL?
No. While plugins can make complex changes easier, you can update the site URL manually via the dashboard, wp-config.php
, or the database. Plugins are helpful for large sites with many internal links or serialized data to update.
5. How do I fix images and links that still point to my old domain after the change?
Use a plugin like Better Search Replace or Velvet Blues Update URLs to scan and update all instances of your old URL within your database. Also, review menus, widgets, and custom code for any remaining outdated links.
In Summary
Changing your WordPress site URL is a significant action, but with careful planning and the right steps, it can be a smooth and beneficial process. Always back up your website before proceeding and methodically update your site, links, and associated services. The right approach ensures your site stays accessible, maintains its search engine value, and delivers a seamless user experience at its new address.