Complete Guide to Migrating a WordPress Site
Migrating a WordPress site involves moving the site files and database, then updating the wp-config.php file. This can be done through your web host's file management interface or an FTP client like FileZilla to connect to the new web server. Although this method requires advanced technical skills and a good knowledge of databases, it presents less risk of errors. You can also do this with WordPress plugins, this is the method that I personally recommend.
In this article, I give you a complete guide to teach you how to migrate a WordPress site from one server to another without stress. In addition, I will give you reasons why you may be forced to migrate and the consequences that follow.
Table of contents
Why migrate a WordPress site?
There are several reasons why you might want to move a WordPress site to another server. With your old host, your site may take a long time to load, exceeding sometimes 4 seconds. This can hurt its credibility, as visitors are not willing to wait for a long time. Moreover, choosing an unreliable hosting provider to transfer your WordPress site can lead to security and availability issues. So, you are probably wondering how to migrate a WordPress site. Before answering this question, let's look at the benefits of such a project.
Get 200% Bonus after your first deposit. Use this promo code: argent2035
Moving a WordPress site to a new host allows you to improve security, loading speed, and uptime. In addition, it can also benefit your SEO. Therefore, it is important to think carefully about your choice of new host. Before proceeding, it is essential to consider the specific requirements of your site. Does it need special features or scalability options? Another point to consider is reliability. You must ensure that your new host can guarantee a availability of approximately 99,9%. The LWS host or, Ex2 Host are examples.
Fast and reliable technical support is also crucial. If something goes wrong during the transfer, your biggest enemy will be time, because the longer it takes for your site to get up and running again, the more money you risk losing. Unfortunately, few web hosts meet all of these criteria. At Finance de Demain, we take care to select appropriate hosts for your activity.
Steps for migrating a site with fileZilla
So follow these steps to migrate your WordPress site manually
First, choose a reliable web host
It is essential to avoid making the same mistakes. If your current WordPress host is slow and experiencing interruptions, it is best to choose a trusted host. The main criteria to consider when choosing a WordPress hosting provider include uptime, performance, and responsiveness of customer support. You can test a host without commitment.
If you want to simplify this process, here are our recommendations: For managed WordPress hosting, Kinsta et Rocket.net are among the fastest, offering 100% uptime and exceptional customer service, with rates starting at $30 per month. If you're on a tight budget, consider shared hosting, such as BlueHost ou SiteGround, which are more affordable (around $5 per month), although slightly less powerful, but still reliable. Check out this complete guide on how to choose a good web host.
Backup your WordPress files
Backing up your WordPress files means taking steps to protect and maintain your WordPress site files. This may include creating regular backups to prevent data loss in the event of a technical issue or hack. Backing up WordPress files is essential to ensuring the security and continuity of your website.
First, you need to download all the WordPress files to your computer. You will upload these files to your new hosting account later.
Connect FileZilla to your old site's server. Next, open the public_html folder and select all the WordPress files inside. Finally, right-click and select Download.
Create a WordPress database on your new web hosting
Before migrating your website to a new hosting, you need to create a clean database on the new hosting. Log in to your new hosting provider's cPanel interface, navigate to the โMySQL databasesโ, create a new database, add a new user with a secure name and password, and then assign all rights to this user on the database. Make sure to write down all this information as you will need it when migrating your site.
Update the wp-config.php file
The next step in migrating your WordPress site is to edit the wp-config.php to populate it with the new information from your database. You should now have your entire site backed up. Go to where the backup was saved, open the folder and find the file wp-config.php. Copy it and save it somewhere else in case you make a mistake later.
Open the file wp-config.php original with a text editor. Now you will need to change the name of your database, as well as the username and password. Find the following lines in the file wp-config.php :
- define('DB_NAME', 'yourdatabasename'); >> here you will need to change 'nameofyourdatabase' (the value entered will correspond to the name of the database defined by your old host).
- define('DB_USER', 'databaseusername'); >> change the โdatabaseusernameโ value to specify the new username you defined in the previous step of our tutorial.
- define('DB_PASSWORD', 'adminaccountpassword'); >> replace the password of your old admin account for your WordPress database with the new one you just set.
Once all these modifications have been made, you will only have to save your file wp-config.php, then close it.
Import your WordPress database
We are nearing the end of the migration process for your WordPress site. The next step is to import your WordPress database to the new database we had you create. From your new hostโs cPanel, go to the phpMyAdmin section, and select the new database you recently created. Then, click on the โImport".
Select the file containing the export of your database by clicking on the โBrowseโ. Uncheck the box for partial import, then make sure the selected format is โSQLโ. Then click on the button โExecuteโ. A warning message will be displayed once the import is complete.
Upload your site's WordPress files to your new host
You are about to finalize the migration of your WordPress site. To do this, you need to access the FTP space of your new hosting and copy all the files of your site into the folder public_html. Make sure to update the file wp-config.php. This step may take some time depending on the size of your site. Once the copy is complete, do not delete anything from your computer, external storage, or cloud. First, double-check that everything went well before deleting anything.
The last step in migrating your WordPress site is to change the DNS servers. Currently, they point to your old host. So you will need to change the DNS servers so that your site uses those of your new host. If you have any difficulties, do not hesitate to contact customer support. To change the DNS of your site, generally go to the control panel of your domain name, in the section โnameserversโ, Then clickโEdit".
Once the change is made, save and wait 48 hours for the propagation to complete. After this period, browse your WordPress site to make sure everything is working properly. If everything is in order, wait another week as a precaution, then delete the data related to your site at your old host and cancel your subscription. To be sure, keep the data on an external storage space for an indefinite period.
Article to read: How to fix 404 errors on a site
Migrate a WordPress site with Duplicator
Duplicator is one of the most widely used and trusted WordPress plugins. This freemium plugin can be used for free, allowing you to get all the features needed to move your WordPress site. With a high rating of almost 5/5 and over a million active installations, Duplicator is available directly from your WordPress admin. Additionally, this plugin is available in the official directory, directly from your administration.
Step 1: Create the migration packages
Moving a WordPress site can be likened to moving your home. Just like moving, you have to prepare packages. However, with the Duplicator tool, the process is simplified and requires only a few clicks. Go to the tab Duplicator > Packages then click โCreate a packageโ.
A window will open to allow you to configure your package. First, and to simplify the process, check if the automatically generated name suits you, then click on Next.
Step 2: Scan the package
Normally, everything should go well during the scan and all the lights should be green.
This step could be compared to the administrative formalities of moving your home. For example, EDF OK, Telephone line OK, Water OK, Mail tracking OKโฆ
In this case, you can proceed to the next step by clicking on "Creation".
Except that in practice, the seers โSize checkโ et "Name Check" are often red.
The light " size check ยป lights up red when the site package exceeds 150MB, which happens often. In most cases (90%), you don't need to worry about this, unless your package is really very heavy. In this case, you can go back to the previous step and exclude some files or folders that are a bit heavy, like the UPLOADS folder that contains all your images. To do this, you will just need to to enable file filters and click on wp-uploads and then proceed to the next step again. You can re-import this folder manually after migrating your WordPress site.
The light " name verification ยป lights up red when Duplicator detects accents or special characters in your image names. Although I often say it, it doesn't change anything. In the future, consider optimizing your images for the web as explained in this tutorial. For now, ignore this alert.
Step 3: Create and retrieve the package
Click on Creation to begin package assembly. Wait during the process. When your package is created, a screen with 2 blue buttons appears.
Get 200% Bonus after your first deposit. Use this official Promo code: argent2035
Click on these two buttons so that the elements are downloaded locally. Be sure to wait until the download is complete.
Now you have your complete site thanks to two elements:
- The archive in format .zip : Do not unzip this archive under any circumstances. It can only be used in .zip format. Be careful, if you are using Safari, it is likely that the browser will unzip the archive automatically. In this case, you will need to repeat the download via Chrome or Firefox.
- The file installer.php : it goes with the archive and cannot be used with any other package.
These two elements will allow you to move your siteโฆ
Step 4 โ Preparing the new environment
Creating the database for your duplicate WordPress site will depend on the environment you want to install it in.
In the screenshot, it is about creating a database on a local server like Xampp or Mamp. To access it, go to the corresponding URL:
- localhost:8888/phpMyAdmin/ for MAMP,
- localhost/phpMyAdmin/ for XAMPP
- localhost:8080/phpMyAdmin/ in rare cases.
In the tab Databases, enter a new database name (without accents, spaces or special characters), choose the utf8_general_ci collation and then click on Create. The second step in preparing the new environment is to place your site in the root of your server (or in a subfolder, if you wish).
For this example, I place my site in a folder named "migration-duplicator" at the root of my local server, either in the HTDOCS folder of MAMP or XAMPP. In this folder, I place my installer.php as well as my archive.zip (the two elements retrieved in step 3 of this tutorial).
Step 5 โ Connect the site to its new environment
Everything is almost done! All that remains is to integrate the export archive into its new environment (its new database and its new URL). Go to a browser (Firefox or Chrome) and enter the new address of your site:
- MAMP case: localhost:8888/the-subfolder-name/installer.php โ in my case, it gives localhost:8888/migration-duplicator/installer.php
- XAMPP case: localhost/the-subfolder-name/installer.php
- Case of a remote server (a live environment): https://votre-site.com/installer.php. In this case, it is imperative to enter the protocol HTTPS (you must have previously enabled SSL on your host). If you forget to enter HTTPS, WordPress will install on an HTTP URL and you will then have to proceed a migration to HTTPS, it is best to avoid this step.
If you didn't make a mistake in the URL, you will arrive at the Duplicator screen:
Click on Next to follow the process. Just follow the steps to complete the process.
Migrate a WordPress site with cPanel
If you are migrating your WordPress site from a host using cPanel, follow these steps to add the backup file:
- From cPanel, navigate to Files โ Backup Wizard.
- Select Backup โ Full Backup. This option covers your home directory, WordPress database, mail forwarder configuration, and mail filter configuration.
Set your preferred backup destination. In this tutorial, we will go with home directory. Don't forget to add your email address if you want to be notified once the backup process is complete. Click on โGenerate a backupโ to start the process. Once you have the backup ZIP file, restore it to the new hosting. If your hosting provider also uses cPanel, follow these steps:
- Go to โFiles โ Backup Wizardโ from the cPanel of your new hosting.
- Select โRestore โ Home Directory".
- Choose the backup ZIP file you created and click โDownload".
You can restore your backup data by manually uploading the ZIP file to the root folder of your new web host, either through the control panel's file manager or through an FTP client. Make sure that all WordPress site files in the folder public_html from the old host are successfully moved to the folder public_html from the new host. Also check the maximum file size allowed with your file manager or FTP client.
Article to read: Understanding how a site is indexed at Google
Benefits after migrating a site
Listen, buddy, let me tell you something about migrating your WordPress site to a new server. Itโs like moving to a new house, you know? It can be a bit of a pain in the ass at the time, but the benefits in the aftermath are pretty damn good!
First, imagine that your site is like an old car that's starting to misfire. You put it in a brand new garage, with the latest tools, and boom! It starts purring like a Ferrari. Same for your site on a new server. It can give it a big speed boost. Visitors won't wait 107 years for your home page to load anymore. It's going to be a blast!
And let's talk about security! It's like moving from an apartment with a rotten lock to a high-tech bunker. New servers often have top-notch security systems. No more breaking out in a cold sweat every time you hear about a new WordPress vulnerability. Ah, and stability! You know those times when your site crashes for no apparent reason? With a good server, it becomes as rare as snow in the Sahara. It's like going from an internet connection that drops every two minutes to fiber optics. A real joy!
And then there's the scalable side of things. Let's say your site is a hit and you suddenly have a ton of visitors. On your old server, it would have been panic on board. But here, it's like having an expandable house. You can manage growth without worrying about it.
Not to mention technical support. On some new servers, you have guys who are there 24/7 to help you if there is a problem. It's like having a geek friend always available to help you out. That's worth its weight in gold when you're in trouble at 3am because your site is messing up.
5 best plugins to migrate a WordPress site
Come on, buddy, let me tell you about the 5 best migration plugins for WordPress. Itโs a bit like choosing the best car to move in, except here, weโre moving your website. Hold on tight, weโre going to take a look at these little gems that will make your life easier!
All-in-One WP Migration
The great thing about this plugin is, It's its simplicity. You don't need to be a geek with square glasses to use it. It's so simple that even your grandmother could migrate a site with it (well, she still needs to know what WordPress is, right?).
Here's how it works roughly:
- You install it on your site. It's as easy as installing an app on your phone.
- You click on โExportโ. The plugin does its magic trick and packages your entire site.
- You go to your new server, you install WordPress and the plugin.
- You click on โImportโ and you load the file you exported.
- You make yourself a coffee, come back, and boom! Your site is there, as if nothing had happened.
The cool thing is that it manages everything: your posts, your pages, your comments, your settings, your plugins, your themeโฆ All that stuff. Itโs like moving your house with everything in it, even the dust under the carpet! And in terms of compatibility, itโs great. Whether your host uses cPanel, whether you have file size limitations, or even if you have a slightly weird configuration, All-in-One doesnโt care. It still does the job.
Now, don't think it's perfect either. The free version has its limitations. If your site is bigger than a bull in a china shop, you might have to upgrade to paid version to manage large files.
UpdraftPlus
UpdraftPlus is a WordPress plugin that allows users to backup, restore, and migrate their websites efficiently. It is particularly appreciated for its ease of use and robust features, making it a popular choice among both novice and experienced site owners.
One of the features UpdraftPlus keys is the ability to perform full backups. This includes not only all site files, such as themes, plugins, and media, but also the database, which contains all site content and settings. This full backup ensures that all essential information is preserved in the event of a problem.
Another important aspect of UpdraftPlus is its ability to store backups in the cloud. Users can choose from various online storage services, such as Google Drive, Dropbox, or Amazon S3. This keeps backups secure and easily accessible, even if the primary server fails.
In the event of a problem, such as a site outage or human error, UpdraftPlus offers a easy restoration. With an intuitive interface, users can quickly restore their site from previously created backups, minimizing downtime and data loss.
WP Migrate DB
WP Migrate DB is a WordPress plugin designed to make it easy to migrate databases between different development, testing, and production environments. It is especially useful for developers and site administrators who need to transfer data without complications.
One of the key features of WP Migrate DB is its ability to export a siteโs database as an SQL file. This allows users to save all the essential information, including posts, pages, comments, and settings. The export is quick and easy, making it an effective tool for managing a siteโs data.
Another key feature of WP Migrate DB is the ability to replace URLs and file paths when exporting. This is especially useful when migrating a site from an on-premises environment to a live server, or vice versa. This is because URLs and paths can vary from one environment to another, and WP Migrate DB automates this process, avoiding manual errors.
Additionally, WP Migrate DB offers a user-friendly interface that allows users to customize export options. Users can choose to migrate only certain tables in the database, which is convenient when they want to transfer only specific data, such as users or configuration settings.
BackupBuddy
First, you have to know that it is not a Free plugin. It's like getting a premium gym membership: it costs a little, but you get all the crazy equipment at your disposal. But hey, for what it does, many say it's well worth it. So what's in it for this BackupBuddy?
- Crazy backups:
It's like taking high-definition photos of every corner of your site. It backs up everything: your posts, your media, your settings, your plugins, your theme, absolutely everything. And the best part? You can schedule these backups. It's like having a personal photographer who takes pictures of your site every day, without you having to think about it. - Built-in cloud storage:
BackupBuddy is friends with all the big names in cloud storage. Google Drive, Dropbox, Amazon S3โฆ You can send your backups directly there. Itโs like putting copies of all your stuff in different safes scattered around the world. Maximum security, my friend! - Easy migration:
This is where it gets really cool. Want to move your site? No worries. BackupBuddy packs everything up and reinstalls it somewhere else in a snap. Itโs like you can teleport your entire house from one place to another without breaking anything. - One-click restore:
Your site crashed? Donโt panic! With BackupBuddy, you can get it back up and running faster than you can drink a beer. One click, and poof, your site is back to how it was before the crash. - Diagnostic tools:
It's like having a doctor for your site. BackupBuddy regularly checks to make sure everything is okay and alerts you if something is wrong. - Serial updates:
You can update all your WordPress sites at once. It's like being able to repaint every room in your house with the push of a button. - Malware Scan:
It keeps an eye out for viruses and other nasty stuff that might try to sneak into your site. It's your digital watchdog.
Now, like everything in life, BackupBuddy has its little flaws. Sometimes, on cheap hosts or with weird configurations, it can have trouble. And then, I have to admit that all these features can be a little intimidating at first. It's like having a Ferrari when you're used to driving a Clio.
But honestly, if you have a WordPress site that you cherish like the apple of your eye, that you want to be sure of never losing it, and that you have a little budget to devote to it, BackupBuddy, It's a bit like the Holy Grail. This is the kind of plugin that makes you sleep soundly. You know that no matter what happens to your site, you have a superhero in your pocket ready to intervene. So, are you ready to put your site in the muscular hands of BackupBuddy?
Duplicator
So him, he is the pro of duplication. It's like cloning your house with everything in it. It creates a package with all your files and database. Then you can reinstall it somewhere else as easily as you would install a new game on your PC. The cool thing is that it handles big sites and complicated setups really well. If you have a site that feels more like a maze than a studio, Duplicator is your best friend.
Leave comments