EDUCBA Logo

EDUCBA

MENUMENU
  • Explore
    • EDUCBA Pro
    • PRO Bundles
    • Featured Skills
    • New & Trending
    • Fresh Entries
    • Finance
    • Data Science
    • Programming and Dev
    • Excel
    • Marketing
    • HR
    • PDP
    • VFX and Design
    • Project Management
    • Exam Prep
    • All Courses
  • Blog
  • Enterprise
  • Free Courses
  • Log in
  • Sign Up
Home Software Development Software Development Tutorials WordPress Tutorial Migrate a WordPress Site
 

Migrate a WordPress Site

Shamli Desai
Article byShamli Desai
EDUCBA
Reviewed byRavi Rathore

Migrate a WordPress Site

How do you Migrate a WordPress Site?

When you migrate a website, it means moving it from one hosting environment or platform to another. This can involve transferring the website’s files, databases, and settings to a new web host, changing the website’s domain name, or upgrading the website’s infrastructure (like moving to a new content management system, such as WordPress). So, how do you migrate a WordPress site? If you are experiencing slow performance even after optimization or have security concerns, it might be time for a change. A new hosting provider might help improve your website’s overall experience.

 

 

Here is what you should consider when picking a new host:

Watch our Demo Courses and Videos

Valuation, Hadoop, Excel, Mobile Apps, Web Development & many more.

  • Speed: Ensure your new hosting service delivers fast load times, as site speed affects user experience and search engine rankings. A no-code tool like Nostra AI can help optimize your website’s performance. Site speed affects users’ experiences and how well your site ranks in search results.
  • Security: Check for security features like regular backups and malware protection.
  • Data Storage: Ensure the hosting plan offers enough storage and can handle your site’s traffic.
  • Customer Support: Choose a host with dependable, 24/7 support.

Tip: Research hosting companies thoroughly to avoid frustrations with slow customer support and hidden fees. You can either have your new hosting handle the transfer or do it yourself.

Ways to Migrate a WordPress Site

There are 2 ways to migrate a WordPress site:

Method 1: Migrate Through Hosting Provider

Most hosting providers offer a free website transfer service for new customers.

For instance, ScalaHosting provides free site migration when you sign up for their WordPress hosting. Contact their customer support for assistance, and they will help you with the process.

This method is straightforward and minimizes the risk of errors.

Method 2: Manually Migrate a WordPress Site

To migrate a WordPress site manually, follow these steps:

Step 1: Backup Website Files and Database
Step 2: Create a New SQL Database and Import the Old Database
Step 3: Upload Your Old Site Files to the New Web Host
Step 4: Edit the New Site’s wp-config.php File
Step 5: Update the DNS Settings

Detailed steps for manual migration are as follows:

Step 1: Backup Website Files and Database

Save your website’s original files and database before making any hosting changes.

Backup Files:

  1. Use an FTP tool (e.g., CrossFTP or FileZilla) to connect to your server.
  2. Navigate to your WordPress root folder, often named “public_html” or “www.”
  3. Right-click and download the entire root directory.

Backup Website Files and Database

Backup Database:
1. Access your hosting control panel (like cPanel).

Access your hosting control panel

2. In the “Database” section, click on “phpMyAdmin.”
3. Choose your database and click “Export.” We have a php tutorial to further guide you on this.

Choose your database

Step 2: Create a New SQL Database and Import the Old Database

Create a New SQL Database and Import the Old Database

Create a New Database:

  1. In your new hosting account’s cPanel, go to the “Database” section and click “MySQL Database.”
  2. Name your new database, which will appear in the cPanel account’s “Current Databases” table.

Import Old Database:

  1. Edit the wp-config.php file on your local computer to update it with the new database information. Here’s why:
    • wp-config.php file connects your WordPress installation to its database.
    • It contains essential details like the database name, username, password, and host.
    • When you move to a new host, the database information changes.
    • If you do not update the wp-config.php file, it will prevent your site from accessing its database, causing errors and making it inaccessible

Import Old Database

  1. So, access the wp-config.php file through the folder where you downloaded your old site files (the new host’s cPanel).
  2. Open it in a text editor like NotePad or TextEditor and make the necessary changes.

Open it in a text editor

Step 3: Upload Your Old Site Files to the New Web Host

Import Database:
Before uploading old site files, import your database using phpMyAdmin or a MySQL command-line program. The easiest method is using phpMyAdmin.

1. In your new host’s cPanel, go to “phpMyAdmin” under the “database” section.
2. Select the target database on the left side and click “Import.”

Upload Your Old Site Files to the New Web Host

3. Navigate to the “File to Import”
4.  Click “Browse” to select the exported database file from your computer.

Browse

Upload Files:

  1. Use an FTP program to connect to your new host.
  2. You can then find the folder to which your WordPress website will be stored.
  3. Upload your old site files to the new WordPress folder.

Tip: Keep the old files on your computer even after a successful upload. If you encounter an issue while migrating your site, you can then access and restore the data.

Step 4: Edit the New Site’s wp-config.php File

Updating the wp-config.php file on your WordPress website ensures you connect to the correct database. The file is in the root directory of your WordPress installation.

Edit the New Site’s wp-config.php File

Update Configuration:

1. Open the wp-config.php file with your hosting provider’s file manager (like the cPanel File Manager) or an FTP client.

2. File Manager Method: Select wp-config.php and choose “Edit.”

Update Configuration

3. FTP Client Method: Download wp-config.php to your computer, open it in a text editor (e.g., Notepad, Visual Studio Code), and edit the following:

    • Database Name
    • Database Username
    • Database Password
    • Database Host

4. Save the changes after editing the wp-config.php file.

    • If edited directly in the file manager, save the changes there.
    • If edited locally, save it, and then upload the modified wp-config.php file back to your server to overwrite the existing one.

Step 5: Update the DNS Settings

Change DNS Records:
1. After uploading your files, update the DNS settings to point to your new site’s IP address through your domain registrar’s portal.
2. The domain name registrar will provide the necessary information to complete this step.

Update the DNS Settings

3. The update process can take 28 to 48 hours. Wait for the transfer to complete before making any changes to your site.

Update process

4. Final Step: Delete your database and files from the old host once the migration is complete and confirmed. Keep a local backup, just in case.

Final Thoughts

Migrating a WordPress site from an old host to a new host can greatly improve its speed, security, and overall performance. Whether you opt for your new hosting provider to handle the migration or manage it yourself, following the steps to backup your data, create and configure a new database, upload files, edit configuration settings, and update DNS records will ensure a seamless transition. By carefully executing these steps, you can effectively migrate a WordPress site and enjoy enhanced hosting benefits.

Recommended Articles

We hope this article on how to migrate a WordPress site simplifies your transition. Explore these additional resources for more tips on web hosting and WordPress management.

  1. WordPress Website
  2. WordPress Hosting
  3. WordPress eCommerce
  4. Types of Web Hosting

Primary Sidebar

Footer

Follow us!
  • EDUCBA FacebookEDUCBA TwitterEDUCBA LinkedINEDUCBA Instagram
  • EDUCBA YoutubeEDUCBA CourseraEDUCBA Udemy
APPS
EDUCBA Android AppEDUCBA iOS App
Blog
  • Blog
  • Free Tutorials
  • About us
  • Contact us
  • Log in
Courses
  • Enterprise Solutions
  • Free Courses
  • Explore Programs
  • All Courses
  • All in One Bundles
  • Sign up
Email
  • [email protected]

ISO 10004:2018 & ISO 9001:2015 Certified

© 2025 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

EDUCBA
Free Software Development Course

Web development, programming languages, Software testing & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA Login

Forgot Password?

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more

🚀 Limited Time Offer! - ENROLL NOW