Home Page Blog How to Change WordPress URL and Not Ruin the Whole Website? How to Change WordPress URL and Not Ruin the Whole Website? WordPress Last Updated: 21/05/2025 Share on Social Media: 1,099 16 min. Understanding the nuances of URLs – the web addresses that guide users and search engines to your content – is paramount. This article delves into the vital role URLs play in your website’s identity and functionality. Changing a URL in WordPress might seem straightforward, but it comes with its share of risks. An incorrect approach can lead to broken links, lost traffic, and even adversely affect your site’s SEO. So, how to change your WordPress URL? We’ll guide you through the potential pitfalls of changing links and provide strategies to mitigate these risks. By the end of this article, you will be equipped with comprehensive knowledge on how to safely alter links in WP, whether it’s changing link color or modifying permalink structures, without jeopardizing the integrity of your website. Whether you’re rebranding, shifting to HTTPS, or modifying permalink structures, this guide aims to ensure your transition is as smooth and error-free as possible. For step-by-step guidance on changing link colors, check out ProCoders’ easy guide. Introduction to Changing WordPress URLs Changing WordPress URLs is a common task that requires careful handling to avoid breaking internal links and making your site inaccessible. Whether you’re rebranding, moving to a new domain, or switching to HTTPS, updating your WordPress site URLs is essential. There are multiple methods to change your WordPress URLs, including updating the WordPress address and site address in the WordPress dashboard, editing the wp-config.php file, or using the WordPress command line interface (WP-CLI). Each method has its own set of steps and precautions. Understanding the risks involved and taking necessary precautions will ensure a smooth transition. In this article, we will guide you through the process of changing your WordPress site URLs step by step. Preparing for the URL Change Changing your WordPress site’s URL requires careful preparation to ensure a smooth transition. This involves: Creating a Full Backup: Before any changes, make a complete backup of your WordPress database, all the files, themes, plugins, and media content. This can be done using WordPress backup plugins, manual methods via FTP, or tools from your hosting service. Informing Your Users: If the link change is significant, like a domain change, notify your users in advance through email, social media, or website notices. Explain the reasons for the change to maintain user trust. Planning for SEO and Redirects: Consider the impact of the URL change on SEO. Update internal links and sitemaps, and inform search engines about the change. Set up 301 redirects from old links to new ones to avoid 404 errors and guide users and search engines to the correct pages. By following these steps, you can minimize risks associated with changing your site’s link and maintain its integrity and performance. Understanding the Risks of Changing WordPress Site URLs Changing WordPress site URLs can be stressful if not done correctly. A small mistake can break all internal links on your WordPress site, making it inaccessible to visitors. It’s crucial to notify search engines of the change to avoid losing traffic and rankings. Before making any changes, it’s recommended to backup your WordPress database and files to prevent data loss. Additionally, it’s essential to update the website URL in the WordPress settings, including the site address and WordPress address, to ensure that all links and references are updated correctly. By taking these precautions, you can minimize the risks associated with changing your WordPress site URLs. Method 1: Changing the URL from WordPress Admin Dashboard So, how to change the URL in WordPress? One of the most straightforward methods to change the URL of your WordPress site is through the WordPress Admin Dashboard. This method is ideal for situations where you need to update the Site Address (URL) or WordPress Address (URL) in the General settings. Here’s a step-by-step guide to making this change, along with tips to avoid potential pitfalls. Step-by-Step Instructions on WordPress Change Page URL Access WordPress Settings: Log in to your WordPress dashboard. Navigate to the ‘Settings’ > ‘General’ section. This is the general settings page where you can configure various site settings. Update Links: You’ll find two fields – ‘WordPress Address (URL)’ and ‘Site Address (URL)’. The ‘WordPress Address (URL)’ is where your WordPress core files reside, and the ‘Site Address (URL)’ is the address your visitors will use. Update these fields with your new URL. Save Changes: After entering the new links, scroll down and click ‘Save Changes’. Your site will immediately start using the new URLs. Recommended: How to Edit WordPress Blocks Potential Pitfalls and How to Avoid Them Inaccessibility After Change: If you accidentally enter an incorrect URL, you might get locked out of your dashboard. To prevent this, double-check the link before saving changes. Database Update Needed: Remember, changing URLs through the dashboard won’t update URLs in your existing content. You’ll need to update links in posts, pages, and settings manually or use a plugin to handle this. Secure Connections: If you’re moving to HTTPS, ensure you have an SSL certificate installed before changing the link to an HTTPS address to avoid security warnings. Clear Cache: If you’re using caching plugins or server-level caching, clear the cache after changing the link to prevent display issues. What to Do After Changing Links: For each of the methods, after the site URL is changed is better to update permalinks. In some cases, if the permalinks are not updated, the inner pages will return 404. To update permalinks from the WordPress dashboard, navigate to Settings > Permalinks and click the Save Changes button at the end. By following these steps, you can change your WordPress site’s link from the admin dashboard effectively. It’s a simple process but requires attention to detail to avoid common mistakes. Craft a Unique Digital Identity – Trust ProCoders’ WordPress Experts for Your Website Needs! Let’s Get Started! Let’s get started Method 2: Editing the wp-config.php File Another way how to change the URL of a page in WordPress? For users who need a more direct approach or are unable to access the WordPress Admin Dashboard, changing the link can be achieved by editing the WordPress configuration file, specifically the wp-config.php file. This method involves adding lines of code to this critical configuration file. Here’s how to do it: How to Access and Edit wp-config.php Locate the wp-config.php File: The wp-config.php file is located in the root directory of your WordPress installation. This is the same folder where you find folders like ‘wp-content’. Access the File: To edit the file, you can use an FTP client or the File Manager in your web hosting control panel. Connect to your server, navigate to the root directory, and locate wp-config.php. Edit the File: Once you’ve found the file, open it for editing. If you’re using an FTP client, download the file to your computer, open it with a text editor, and make the necessary changes. If you’re using File Manager, you can edit the file directly on the server. Adding the Necessary Lines of Code to Change the Link Insert Code for URLs: Add the following lines of code to your wp-config.php file, ideally above the line that says /* That’s all, stop editing! Happy blogging. */: define('WP_HOME','http://yournewurl.com'); define('WP_SITEURL','http://yournewurl.com'); Replace http://yournewurl.com with your new URL. Save and Upload the File: After adding these lines, save the file. If you’re using an FTP client, upload the modified wp-config.php back to your server. Check the Site: Once the file is saved and uploaded, visit your WordPress site to ensure that the changes have taken effect. Important Considerations Backup Before Editing: Always make a backup of wp-config.php before editing. Any mistakes in this file can render your site inaccessible. Correct Syntax: Ensure that the syntax is correct when adding the code. Syntax errors can cause your site to malfunction. Temporary Change: This method is often used as a temporary solution, especially when troubleshooting or when the WordPress Admin Dashboard is inaccessible. For a permanent change, it’s recommended to update the URLs via the WordPress dashboard and ensure all links in content are updated accordingly. Editing the wp-config.php file to change the WordPress URLs is a powerful method but should be approached with caution due to the sensitive nature of the file. Method 3: Using the WordPress Database Another effective method for how to change URL on WordPress is by performing a database search and directly editing the site link and home values in the WordPress database. This method is particularly useful if you’re unable to access the WordPress admin area or need to correct URL issues after a site migration. Here’s how to do it through phpMyAdmin, a popular database management tool available in most hosting control panels. Accessing phpMyAdmin Through Your Hosting Control Panel Log Into Your Hosting Account: Start by logging into your web hosting control panel provided by your hosting provider. This is typically where you manage your hosting settings, email accounts, and databases. Navigate to phpMyAdmin: Once logged in, look for the ‘Databases’ section and find phpMyAdmin. Clicking on it will open the phpMyAdmin interface, which is used for managing your MySQL databases. Select Your WordPress Database: In phpMyAdmin, you’ll see a list of databases on the left side. Select the database that corresponds to your WordPress site. If you’re unsure which one it is, check the wp-config.php file where the database name is defined. Identifying and Updating the siteurl and home Values in the Database Find the wp_options Table: After opening your WordPress database, look for the wp_options table. This table typically stores site-wide settings, including the links. Edit siteurl and home Values: Inside the wp_options table, search for the siteurl and home rows. These rows contain the URL of your WordPress site. Click the ‘Edit’ button next to each to change their values. This step is crucial when changing your domain name, as it updates the domain name in the database. Update the URLs: In the ‘value’ column for both siteurl and home, replace the existing link with your new one. Make sure to enter the correct URL and avoid typos. Save Changes: After editing, save your changes. Each row will have a ‘Go’ or ‘Save’ button to confirm the update. Method 4: Utilizing Functions.php File WordPress change URL in database can also be accomplished by editing the functions.php file of your WordPress theme. This method is particularly useful for making temporary changes, such as when moving your site to a local server for testing or troubleshooting. Here’s how to use the functions.php file to temporarily change your WP link: Editing the Functions.php File of Your Theme Edit the File: Open the functions.php file for editing. You can do this by downloading the file and editing it with a text editor, or by using the editor in the File Manager. Locate the Functions.php File: The functions.php file is located in your WordPress theme’s folder. You can access it via FTP or through the File Manager in your hosting control panel. Navigate to wp-content/themes/your-theme-folder/. Backup Functions.php: Before editing, it’s advisable to make a copy of the functions.php file. This provides a fallback in case of errors. Achieve Excellence in Web Development – Hire ProCoders’ Skilled WordPress Professionals! Hire Now! technologies Which technologies do you use? Angular Laravel React Symfony Node.js Vue.js Ruby on Rails React Native Ionic .NET Python Web3 Solidity Or just type your tech stack here: expertiese Please choose the experience level: Intermediate Senior Finish Enter your email and check how fast our responses are;)* I'm just checking the prices/options and don't have a need right now. Please don't try to reach out. I have read and agree to the Website Terms of Use and Privacy Policy. Previous Next Method 4: Utilizing Functions.php File WordPress change URL in database can also be accomplished by editing the functions.php file of your theme. This method is particularly useful for making temporary changes, such as when moving your site to a local server for testing or troubleshooting. Here’s how to use the functions.php file to temporarily change your WP link: Editing the Functions.php File of Your Theme Locate the Functions.php File: The functions.php file is located in your WordPress theme’s folder. You can access it via FTP or through the File Manager in your hosting control panel. Navigate to wp-content/themes/your-theme-folder/. Backup Functions.php: Before editing, it’s advisable to make a copy of the functions.php file. This provides a fallback in case of errors. Edit the File: Open the functions.php file for editing. You can do this by downloading the file and editing it with a text editor, or by using the editor in the File Manager. Code Snippets to Change the Link Temporarily Add the Code: At the bottom of the functions.php file, add the following code snippets: update_option( 'siteurl', 'http://yournewurl.com' ); update_option( 'home', 'http://yournewurl.com' ); Replace http://yournewurl.com with your new URL. Upload the Modified File: If you edited the file locally, upload it back to the same directory from where you downloaded it. Check Your Site: After saving changes, visit your WordPress site to ensure the link has been updated. Important Notes Temporary: Changes made in functions.php are temporary. Once you remove these lines, your site will go back to its original URLs. Theme Specific: Since these changes are in the theme’s functions.php file, if you change your theme, the URLs will go back to the original settings. Watch out for Syntax Errors: Be careful with the syntax to avoid site errors. A small mistake in functions.php can break your site. Using functions.php is a quick way to change links, but it requires careful handling to avoid breaking your site. Recommended: How to Hide a Page in WordPress Method 5: Using a Plugin For many users, especially those who don’t want to mess with code or a database, using a WordPress plugin to change the URL of a page is the easiest and safest option. Plugins will simplify the process and reduce the risk of errors and the complexities of manual methods. Here’s how to use a reliable plugin to change your WP URLs. Recommended Plugins to Change URL in WordPress There are several plugins to safely change URLs in WordPress. Here are some of the most reliable ones: Velvet Blues Update URLs: A simple plugin to update URLs when moving your site. Useful for changing URLs in post content, links and images. Better Search Replace: For larger sites, this plugin is a robust solution for searching and replacing URLs in the database. It also has a ‘dry run’ feature to preview changes before applying. Duplicator: While primarily a migration plugin, Duplicator can handle URL changes as part of the site cloning and migration process. How to Use a Plugin to Change Page URL WordPress Safely Install and Activate the Plugin: Go to ‘Plugins’ > ‘Add New’ in your WordPress dashboard. Search for your plugin, install it and activate it. Prepare for the Change: Before you make the change, make sure you have a full backup of your site. This is crucial in case you need to revert back. For a smooth transition, discover strategies and tips for migrating from AngularJS to Angular. Configure Plugin Settings: Go to the plugin’s settings page. Each plugin will have a slightly different interface but generally you’ll be asked to input your old link and the new one you want to change to. Run the Change: Follow the plugin’s instructions to start the URL update process. Some plugins will offer a preview or a ‘dry run’ to see what changes will be made before applying them. Check Your Site: After the process is complete, go to your site and check if the URL change has been applied. Tips Clear Caching: If you’re using caching plugins or server-level caching, make sure to clear your cache after changing URLs to prevent old content from showing. Update Google Analytics and Search Console: If you use these services, update them with your new link to continue tracking your site correctly. Using a plugin will make the process of changing your WP link much easier and less prone to errors. It’s suitable for all levels of users, so a smooth transition to the new URLs. Optimize Your Website with Precision – Engage ProCoders’ WordPress Developers for Best Results! Enhance your website with our curated list of the best WordPress plugins to cater to all your WordPress website needs. Redirects and Updating Internal Links After changing your WP site’s link, you need to set up 301 redirects, update internal links and notify users of the new address so users and search engines can find the correct pages and maintain SEO value and user experience. 301 Redirects: These are permanent redirects that preserve most of the SEO value. You can set them up using plugins like ‘Redirection’ or ‘Yoast SEO’ or manually add them to your site’s .htaccess file if you’re comfortable with technical edits. Specify the old and new URLs for each redirect and test them afterwards to make sure they work. Updating Internal Links: Manually update key links on important pages and posts. For larger sites, use plugins like ‘Better Search Replace’ for bulk updates. After updating, scan for broken links using tools or plugins. Essential Tips: Backup First: Always backup your site before making these changes. Regular Monitoring: Keep an eye on your site’s performance and check for crawl errors using tools like Google Search Console. See If There Are Any Old URLs left: You can do it in two methods: through a plugin (recommended) or from phpmyadmin (search for the old URL on all database tables and replace it by editing values directly within the database). Implementing these steps is crucial for a smooth transition and maintaining your site’s SEO and functionality after a URL change. Notifying Search Engines of the Change After changing your WordPress site URLs, you need to notify search engines of the change to avoid losing traffic and rankings. You can do this by updating the website URL in the search engine’s webmaster tools, such as Google Search Console. Use the search engine’s change of address tool to notify them of the change. Also, update the website’s sitemap and robots.txt file to reflect the new URL structure. It’s also recommended to use a 301 redirect to permanently redirect visitors from the old URL to the new one. This will ensure both users and search engines are directed to the correct pages, preserving your site’s SEO value. Testing the Website After Link Change After changing your WordPress site’s URL, you need to test thoroughly to ensure full functionality and maintain your site’s usability and SEO ranking. Here’s a quick way: User Feedback and SEO Monitoring: Monitor user reports for unnoticed issues and watch for any changes in SEO rankings or site traffic that might indicate problems. Test Page Load: Manually visit each page, especially the homepage and high-traffic pages, to make sure they load correctly on the live site. Check Media Files: Verify all images, videos and media are displaying properly on various site sections. Inspect Layout: Look for any layout inconsistencies across different pages that might arise from the URL change. Browser and Device Compatibility: Test your site’s performance across different browsers and devices to ensure uniform user experience. Broken Links and Errors: Use tools to find broken internal and external links. Manually test critical links and use browser tools to find console errors. Redirects: Make sure any set up 301 redirects are working, guiding users and search engines to the correct pages. Optimize Your Website with Precision – Engage ProCoders’ WordPress Developers for Superior Results! Get Started! Let’s get started Troubleshooting Common Problems When you change your WordPress site’s URL, you may encounter common issues like broken links, images not loading, or the site not being accessible. To troubleshoot these issues, you can check the website’s error logs, update the permalinks, or use a plugin to fix broken links. You can also use WP-CLI to update the website’s URL settings or use a search and replace tool to update the database. If you’re using a custom domain, you may need to update the DNS settings to point to the new URL. Also, check the website’s .htaccess file to make sure it’s configured correctly. These steps will help you fix any issues that arise from changing your WordPress site’s URL. Monitoring SEO and Traffic Post-Change After you update your WordPress site’s URL you need to monitor SEO and traffic to make sure your site is not affected. Here’s a quick guide on how to do this: Use Google Search Console to track your WordPress site’s visibility, index status, and identify any crawl errors post-change. Use Google Analytics to see traffic patterns and user behavior, and focus on changes after the update. Use SEO Plugins like Yoast SEO or All in One SEO Pack for insights within your WordPress dashboard, including SEO analysis and readability checks. Use Third-Party SEO Tools like SEMrush, Ahrefs, or Moz for a full analysis, including keyword rankings and backlink profiles. If you see drops in traffic or rankings: Find the Cause: Investigate using the tools above to find the issue, whether it’s a crawl error or page-specific decline. Make sure Redirects and Internal Links Work: Check all redirects from old to new URLs and update internal links. Review and Optimize SEO Elements: Make sure SEO basics like meta titles and descriptions are in place and optimized. Talk to Google Search Console: Submit your new sitemap and request site re-crawling to expedite re-indexing with the new URLs. Monitor Backlinks: If there’s a domain change, reach out to update your link in existing backlinks. Be Patient: SEO and traffic can fluctuate post-change; it takes time to stabilize. Regular monitoring and quick action is key to keeping your site’s search engine ranking and user engagement during and after a URL change. Create a Cutting-Edge Web Presence – Let ProCoders’ WordPress Experts Lead Your Project! Start Now! Let’s get started FAQ How Do I Change the URL of a WordPress Form? To change the URL of a form in WordPress, first, locate the form within your dashboard, typically found in the interface of your form plugin (like WPForms, Contact Form 7, or Gravity Forms). Open the form for editing and navigate to its settings or configuration panel, where you’ll find the option to change the URL (or the action attribute of the form). Change the URL as needed and save your changes. Remember, this process alters the form’s target URL, not the URL of the page where the form is displayed. How Do I Change My WordPress Admin URL? To change your WP admin linkfor enhanced security, install a security plugin like WPS Hide Login or iThemes Security. These plugins provide options to customize your admin URL. After installing, go to the plugin’s settings, specify your new admin link, and save the changes. This will update your WP login link to the new one you’ve set. Can I Change My WordPress Domain? Yes, you can change your WordPress domain. Start by purchasing and registering the new domain you wish to use. Then, in your hosting account, point this new domain to your existing hosting environment. Next, go to your WordPress dashboard, navigate to ‘Settings’ > ‘General’, and update the ‘WordPress Address (URL)’ and ‘Site Address (URL)’ fields to your new domain. Finally, set up 301 redirects from your old domain to the new one to preserve SEO and ensure users can still access your site. How Do I Change a Link in WordPress? To change a link in WordPress, simply edit the content where the link is located, whether it’s a post, page, or widget. Click on the linked text or image to access the URL field or link icon in the editor. Here, replace the existing URL with the new one you wish to use. Finally, save or update the content to apply the changes. For detailed instructions, you may refer to specific plugin guides or WordPress documentation. Conclusion and Final Checks So there you have it, changing your WordPress site URLs requires some planning and execution to avoid breaking internal links and your site going down. Follow the steps above and you’ll be golden. After you’ve made the changes, do a final check to make sure everything is working. Check all links and references are updated, images are loading, and the site is accessible. Use Google Search Console to monitor traffic and rankings. By being prepared and following the above steps, you’ll be able to change your WordPress site URLs and keep your site up and running. WordPress 1,099 Posted: 19/01/2024 Last Updated: 21/05/2025 Previous postDivi Builder Review from Professional Developer Next postWhat is the Advantage of Using a Form HubSpot: Best Practices for Contact Form 7 Write a Reply or Comment Cancel replyYour email address will not be published. Required fields are marked * This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.Post