You will find it in the root directory of your site. WordPress automatically creates this configuration file at the end of the CMS installation. It contains information that allows you to connect to your WordPress database (host, login, and password). The wp-config.php file is one of the major files in the WordPress core. Method 2: Change the URL of your WordPress site in the wp-config.php file This is the purpose of method #2, covered just below. If the “WordPress Address (URL)” and “Site Address (URL)” fields are ever grayed out, or you’ve made a mistake that makes your site inaccessible, you can fix the problem by editing your wp-config.php file. If you have problems with the display, try clearing your browser’s cache to see if that solves the problem. Navigate through your site pages to make sure everything is working properly. Finish by clicking on the “Run Search/Replace” button.In principle, only the box “Run as dry run” should be checked. Leave the default settings in the “Additional settings” box.Select all the tables in your database.In the “Replace with” field, enter the new URL (e.g.In the “Search for” field, enter the URL to be modified (e.g.Once it’s activated, go to the Tools > Better Search Replace menu. To do this, use the Better Search Replace plugin: To avoid this, the best solution is to perform a direct Search & Replace on all the tables in your database (without first changing the WordPress URL on the dashboard). The ideal solution: perform a Search and Replace This is why you should not limit yourself to updating only the two fields present in the administration. The addresses of the images and internal links in your content will not be updated… This will cause many display and navigation problems. However, it only changes the address of your site in the database. This method has the merit of being simple and fast. In a second step, you just have to enter your new URL in the fields “WordPress Address” and “Site Address”:įinish by clicking on the blue “Save Changes” button. Step 2: Change the URL of your WordPress site In principle, keep in mind that the site’s address is the same as the WordPress address, “unless you want your site home page to be different from your WordPress installation directory,” says WordPress. the one that “you want people to type in their browser to reach your WordPress blog,” the CMS documentation details. This is the URL that leads to the address of all the files in the WordPress Core. At the top of the page, you’ll see two fields that interest us: To get started, head to the Settings > General menu. If you’re not sure what you’re doing or have any doubts, don’t do it, or you’ll end up with a broken site. The advice given in the following lines for this method (changing the WordPress URL in the general settings) should be applied with the utmost caution. Method 1: Change the URL of your WordPress site on the dashboardĭon’t feel like getting your hands dirty? Good thing we’re starting with a method that doesn’t require touching the code.Įverything happens directly on the WordPress administration interface (back office). And if you ever want to entrust this task to a professional, use WPSitter. To do this, use a free plugin like UpdraftPlus. To be on the safe side, I recommend backing up your site (files + database) before changing the URL of your WordPress site. How to change the URL of a WordPress site: 5 detailed methods I’ll start with the simplest one, and then I’ll build up to more technical methods as we go along. So, without further ado, let’s get down to business with a presentation of five ways to change the URL of your WordPress site. Duplicator) do this by themselves, so you don’t have to do it. For example, if you’ve developed a site locally and wish to migrate it to the online server, you will have to change your URLs. Moving your site to another directory (e.g.This is essential to secure the connection to your site and improve the user experience. Switching your WordPress site from HTTP to HTTPS.A change of domain name, following the redesign of your WordPress site, for example.However, there are several reasons why you might want to do it, including (but not limited to) the following situations: 4 reasons to change the URL of a WordPress siteĬhanging the URL of your WordPress site is not a common operation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |