Hi, I changed my domain name from xxxx.com to yyyyy.com while keeping all content on the same server. The hosting company made the change and after I had edited all the tables on the wordpress MySQL database to change all occurrences of xxx.com to yyyy.com, disabling Cloudflare and Litespeed cache, I was able to visit the site. Trouble is, the site is a bit jumbled up, with the menu items all over the screen, the content all left justified rather than central etc
thats a problem with editing database URLs as they may be littered over may tables.
Best thing to do is use a search and replace tool like Velvet Blues Replace URL plugin to update them all to the new URL.
I have scanned the database for a word I used in the missing footer widgets. The word was not found. The footers have been deleted. This is not a CSS issue, something has damaged the database, and deleted content.
Migrating your WordPress website to a new URL and unsure about where and how to update old URLs in database? Do you want to skip the tedious process of manually changing the URLs? Learn the painless and quick methods to update site URLs across your website.
Many times, there is a requirement to migrate your WordPress website to a new URL. This would need you to update the old URLs in the database, including the various MySQL database tables. For smaller websites, this can be managed by manually making the changes. However, for larger websites, the volume of the site makes it impossible to update old URLs manually. Another issue is that Webmasters find it mundane and routine work to bulk change the links on the website. This is a time-consuming process as at times the number of URLs to be updated can be in the hundreds. Added to this is the chance to miss some URLs. Situations like these make it almost mandatory to look for automated solutions to do a mass search and replace of the old URLs. Here at Templatetoaster WordPress theme builder, let us look at some of the convenient ways to update site URLs when migrating a WordPress site.
The foremost thing to make sure before you change the URLs is that you take a complete backup of your WordPress database. You can easily revert in case the update process goes wrong. You can choose to do a manual backup of the database or use one of the free WordPress plugins. The detailed process of how to backup your database is given here. Let us now look at the various methods to use for changing the URLs for a WordPress site.
For a small website, you can choose to manually replace URLs across the Website. Most of the time you have to look out for the content where you have placed a link to home page and other internal pages, and simply edit them. This method is only suggested when you have a really small website or a one-page website since this will avoid the overhead of a plugin installation on your website.
You can update old URLs in the database by making the change in each of the above-mentioned tables and fields. But this method is cumbersome and highly time-consuming. Basically, we choose to implement tools and plugins which are easy, safe and quick to use.
The MySQL lets you execute raw queries to find and replace and is used to update old URLs in the database. This is a handy way to change URLs if you have a large website with a considerable number of changes to make.
The PHPMyAdmin allows you to do a quick update of all links on your website by directly updating the old URL in WordPress database. You can use the SQL statements based on MySQL replace () function to update the URLs in the database. You first need to sign to the MySQL database using PHPMyAdmin before you start with the process to update old URLs in the database. You can also login to the DB server and run MySQL client as root.
In case you are not confident about running the MySQL queries then you can choose to do it with a WordPress Plugin. These plugins let you update old URLs in the database. Some of the plugins provide separate options to replace the site URL and to change the URL in all the database tables. The use of a WordPress plugin for mass URL changing would give you the following benefits:
The Velvet Blues Update URLs plugin provides options to change the URLs at places like posts and pages, excerpts, etc. You just need to enter the old and new URLs of your website. After that, you choose where the URLs should be updated.
The WP Migrate DB is a proven and robust plugin that can search and replace data inside serialized data. The plugin is installed on the original site. Once you run a search and replace on URL string and web root, a new database dump is exported. You then need to import this into the new URL hosted database.
I tried Better Search Replace and Velvet Blues to no avail on a website running the elementor page builder. I was reluctant to run more than that cause *apparently* both plugins changed a good number of records but neither is reflected in updated urls in the actual page content (the main menu items were easily changed as part of the migration). I do think that elementor is the issue here and needs to be addressed in a plugin or something.
Whether you are moving from HTTP to HTTPS, changing your domain name, migrating from a local server to a live site, or transferring to a subdomain, you will need to know how to change your WordPress site URL.
However, in some cases, large companies may host their WordPress sites on a different server because their corporate website has many other applications, and they want to isolate where each app is hosted to improve WordPress security.
You will need to add your website URLs to your WordPress configuration file, which is called wp-config.php. This file is located in the root folder of your website and contains important WordPress settings.
All of the methods above will help you change the URL of an existing WordPress installation. This method works a little differently since you will be making your current WordPress URL point to the URL of a new WordPress installation.
Note: There is a free version of the plugin available, but the AIOSEO Pro version is the only way to redirect your entire website, posts, pages, and more without losing your SEO rankings.
Aside from using it to update URLs when moving websites, we also use it to migrate websites to WordPress from various other platforms, such as moving from WordPress.com to WordPress.org, Wix to WordPress, Weebly to WordPress, and more.
We hope this article helped you easily change the WordPress site URLs. You may also want to see our guide on how to get a free SSL certificate for your WordPress site and our expert picks for the best live chat software for small businesses.
Editorial Staff at WPBeginner is a team of WordPress experts led by Syed Balkhi with over 16 years of experience in WordPress, Web Hosting, eCommerce, SEO, and Marketing. Started in 2009, WPBeginner is now the largest free WordPress resource site in the industry and is often referred to as the Wikipedia for WordPress.
Hey WPBeginner readers,
Did you know you can win exciting prizes by commenting on WPBeginner?
Every month, our top blog commenters will win HUGE rewards, including premium WordPress plugin licenses and cash prizes.
You can get more details about the contest from here.
Start sharing your thoughts below to stand a chance to win!
Hello Wpbeginner, i want to change my site from /mysite.com to /www.mysite.com. just the www differ. i want to ask, the backlinks which i have built using the https:// version will it redirect passes link juice to the www version?
.
hi, my colleague used the first method and although the page still exists we cannot log into the wordpress admin site. any suggestions where do I need to revert?
I tried all the other methods in hopes that it would help but to no avail
When I change my website URL from http to https: all looks ok.
however, every time I log out and log in again, the URL is changed back to http
I tried changing from the wordpress admin panel and directly in the database, but the changes are always undone when I log in again.
You may want to check with your hosting provider as some have systems in place to prevent changes in your domain unless they are updated. You would also want to clear your cache if you have it enabled as that is another common cause for that issue.
My wordpress url is on my subdomain and I want to change my site url to my domain. I made the change in my admin area however, I am not seeing the effects of this change in the front end. Would I still need to rn the url replace plugin for it to work?
Thanks for the reply, since i dont have access i need to do it through pho or client file? If so is there a more detailed explanation please? Its my first time and everything is new for me. Thanks so much
The most likely reason you do not have that would be if you are on WordPress.com, if you are then you would not have this option. For a comparison of WordPress.com and WordPress.org you would want to take a look at our article below:
WPBeginner is a free WordPress resource site for Beginners. WPBeginner was founded in July 2009 by Syed Balkhi. The main goal of this site is to provide high quality WordPress tutorials and other training resources to help people learn WordPress and improve their websites.
How do I modify these settings? The WordPress Address and Site Address are both populated with the private IP address my VM is using (under Settings > General from the wp-admin page). No where in the setup or config did I see a prompt to change these. The boxes are both gray and I cannot change the fields.
The command should be run by MySQL not bash (hence the mysql at the start). I don't know why it's not working because I don't know much about using MySQL at the commandline. From what I can gather the line should be launching MySQL command prompt as the default debian user and loading the wordpress DB. But I just tested it myself and sure enough, it errors. This is not quite so tidy, but do this instead (assuming your domain name is www.yoursite.com):
7fc3f7cf58