How to Manually Migrate Your WordPress Website to a New Host (FTP & phpMyAdmin Method)

Migrating a WordPress website can seem like a daunting task, often shrouded in myths about complexity and potential data loss. While many plugins promise one-click migrations, understanding the manual process offers invaluable control, a deeper insight into your WordPress installation, and a reliable fallback when automated tools fall short. This comprehensive tutorial will guide you,…

Migrating a WordPress website can seem like a daunting task, often shrouded in myths about complexity and potential data loss. While many plugins promise one-click migrations, understanding the manual process offers invaluable control, a deeper insight into your WordPress installation, and a reliable fallback when automated tools fall short. This comprehensive tutorial will guide you, step-by-step, through migrating your entire WordPress site—including all its files and the crucial database—from one hosting provider to another using traditional tools like FTP and phpMyAdmin.

This guide is designed for intermediate WordPress users comfortable navigating cPanel (or similar hosting control panels), using an FTP client, and making basic edits to text files. By the end, you’ll have a fully functional WordPress site on your new host and a solid understanding of how its core components fit together.


Section 1: Preparation – Gathering Your Tools & Information

Before you begin the migration, meticulous preparation is key to a smooth transition. Think of this as gathering all your ingredients before you start cooking.

  1. Access to Both Hosting Accounts:
  • You’ll need administrative access (login details for cPanel, Plesk, or your specific hosting control panel) for both your old and new hosting providers.
  • Crucially, you’ll need the FTP credentials for both accounts (hostname, username, password, port—usually 21).
  • Similarly, you’ll need access to phpMyAdmin or a similar database management tool on both hosts.
  1. An FTP Client:
  • A reliable FTP client is essential for downloading and uploading your website files. FileZilla (free and open-source) is highly recommended and widely used. Download and install it if you don’t already have one.
  1. A Text Editor:
  • You’ll need a plain text editor (like Notepad++ for Windows, Sublime Text, VS Code, or Atom for all platforms) for editing the ZEALTERCODE0 file. Avoid using word processors like Microsoft Word, as they can add hidden formatting that breaks code.
  1. Domain Registrar Access:
  • You’ll need login access to the company where you registered your domain name (e.g., GoDaddy, Namecheap, Cloudflare, etc.) to update your DNS settings later.
  1. Local Storage Space:
  • Ensure you have enough free space on your computer to download your entire WordPress installation. This can range from a few megabytes to several gigabytes.
  1. A Full Backup (CRITICAL!):
  • This cannot be stressed enough. Before initiating any migration, always create a complete backup of your existing WordPress site on your old host. Use your host’s backup tools (often in cPanel), a reliable backup plugin (like UpdraftPlus or Duplicator), or manually back up both your database and files. This serves as your safety net in case anything goes wrong.

Section 2: Exporting Your Old Site’s Database

Your WordPress database contains all your posts, pages, comments, user information, settings, and much more. Exporting it correctly is paramount.

  1. Log in to Your Old Host’s cPanel (or Control Panel):
  • Find and click on the phpMyAdmin icon. It’s usually located in the “Databases” section.
  1. Identify Your WordPress Database:
  • On the left-hand sidebar in phpMyAdmin, you’ll see a list of databases. If you’re unsure which one belongs to your WordPress site, open your ZEALTERCODE0 file (located in your WordPress root directory) on your old host via FTP. Look for the line ZEALTERCODE1. This will tell you the exact database name.
  • Click on the correct database name in the left sidebar to select it.
  1. Export the Database:
  • With your database selected, click on the “Export” tab in the top menu bar.
  • Choose the Export Method:
  • “Custom” is recommended as it gives you more control.
  • Ensure all tables are selected (this is usually the default).
  • Output:
  • Format: Select “SQL”.
  • Compression: Choose “gzipped” or “zipped” if your database is large; this will create a smaller file that downloads faster. For smaller databases, “None” is fine.
  • Scroll down and click the “Go” button. Your browser will prompt you to save a ZEALTERCODE0 (or ZEALTERCODE1/ZEALTERCODE2) file to your computer. Save it in a designated folder for your migration files.

Tip: While in your old ZEALTERCODE0, note down the ZEALTERCODE1, ZEALTERCODE2, ZEALTERCODE3, and ZEALTERCODE4 values. You’ll need these later for comparison and for the new ZEALTERCODE5 file.


Section 3: Downloading Your WordPress Files via FTP

Next, you’ll download all your WordPress core files, themes, plugins, and media uploads from your old host.

  1. Connect to Your Old Host via FTP:
  • Open your FTP client (e.g., FileZilla).
  • Enter your Host (usually your domain name, or ZEALTERCODE0), Username, Password, and Port (usually ZEALTERCODE1). Click “Quickconnect” or connect.
  1. Navigate to Your WordPress Root Directory:
  • In the “Remote site” pane (usually the right side of FileZilla), navigate to the folder where your WordPress installation resides. This is often ZEALTERCODE0, ZEALTERCODE1, ZEALTERCODE2, or a subdirectory like ZEALTERCODE3. You should see folders like ZEALTERCODE4, ZEALTERCODE5, ZEALTERCODE6, and files like ZEALTERCODE7.
  1. Download All WordPress Files:
  • In the “Remote site” pane, select all the files and folders within your WordPress root directory. You can do this by clicking the first item, holding ZEALTERCODE0, and clicking the last item.
  • In the “Local site” pane (usually the left side of FileZilla), navigate to the empty folder you created for your migration files on your computer.
  • Drag and drop the selected files and folders from the “Remote site” pane to your “Local site” folder.
  • Warning: This process can take a significant amount of time, depending on the size of your site and your internet connection speed. Ensure your computer doesn’t go to sleep.

Section 4: Setting Up Your New Site’s Database

Now, you’ll prepare a new, empty database on your new hosting account to import your old site’s data into.

  1. Log in to Your New Host’s cPanel (or Control Panel):
  • Find the “MySQL Databases” icon (or a similar option like “Databases” or “Database Wizard”).
  1. Create a New Database:
  • Under “Create New Database,” enter a unique name for your database (e.g., ZEALTERCODE0). Click “Create Database.”
  • Important: Your host might automatically prepend your account username to the database name (e.g., ZEALTERCODE0). Make a note of the full database name.
  1. Create a New Database User:
  • Under “MySQL Users” (or “Add New User”), enter a username (e.g., ZEALTERCODE0) and create a strong password. Use the password generator if available. Make sure to copy this password immediately and store it securely. Click “Create User.”
  • Again, note the full username (e.g., ZEALTERCODE0).
  1. Add User to Database and Assign Privileges:
  • Under “Add User To Database,” select the database user you just created and the database you just created from the respective dropdowns. Click “Add.”
  • On the next screen, check the “ALL PRIVILEGES” box. Click “Make Changes.”
  • Crucial: Record the full database name, full database username, and the password you set for the user. You will need these precisely for your ZEALTERCODE0 file.

Section 5: Importing Your Old Database to the New Host

With the new database ready, you can now import the data you exported from your old site.

  1. Access phpMyAdmin on Your New Host:
  • From your new host’s cPanel, click on the phpMyAdmin icon.
  1. Select the Newly Created Database:
  • In the left-hand sidebar of phpMyAdmin, click on the empty database you created in Section 4.
  1. Import the Database:
  • Click on the “Import” tab in the top menu bar.
  • Click the “Choose File” button and navigate to the ZEALTERCODE0 (or ZEALTERCODE1/ZEALTERCODE2) file you saved from your old site (in Section 2).
  • Ensure the “Format” dropdown is set to “SQL.”
  • Scroll down and click “Go.”
  • You should see a success message indicating the import completed. If you encounter errors, check your SQL file for corruption or size limitations on your new host. For very large databases, you might need to use an SSH command-line import or a tool like BigDump.

Section 6: Uploading WordPress Files to the New Host via FTP

Now it’s time to upload all your WordPress files to the new server.

  1. Connect to Your New Host via FTP:
  • Open your FTP client.
  • Enter your new host’s FTP Host, Username, Password, and Port.
  1. Navigate to Your Target Directory:
  • In the “Remote site” pane, navigate to the directory where your new WordPress site will live. This is typically ZEALTERCODE0 for your primary domain, or a specific subdirectory if you’re installing it elsewhere.
  • Crucial: Ensure this directory is empty or contains only default placeholder files that you are comfortable overwriting.
  1. Upload All WordPress Files:
  • In the “Local site” pane, navigate to the folder on your computer containing all the WordPress files you downloaded earlier (from Section 3).
  • Select all the files and folders within your local WordPress directory.
  • Drag and drop them into the “Remote site” pane’s target directory.
  • Warning: This will also take time. Once complete, you should see ZEALTERCODE0, ZEALTERCODE1, ZEALTERCODE2, and other core files on your new host.

Section 7: Updating the ZEALTERCODE0 File

This is a critical step where you tell your WordPress installation on the new host how to connect to its database.

  1. Locate ZEALTERCODE0:
  • On your new host via FTP, navigate to your WordPress root directory. You’ll find ZEALTERCODE0 there.
  1. Edit ZEALTERCODE0:
  • Right-click on ZEALTERCODE0 in your FTP client and choose “View/Edit” to open it in your chosen text editor. Alternatively, download it to your local machine, edit it, and then re-upload it.
  • Find the database connection settings, which look like this:
        // ** MySQL settings - You can get this info from your web host ** //
        /** The name of the database for WordPress */
        define( 'DB_NAME', 'database_name_here' );

        /** MySQL database username */
        define( 'DB_USER', 'username_here' );

        /** MySQL database password */
        define( 'DB_PASSWORD', 'password_here' );

        /** MySQL hostname */
        define( 'DB_HOST', 'localhost' );
  • Update these four lines with the exact database name, username, and password you created in Section 4 on your new host.
  • ZEALTERCODE0: Use the full new database name (e.g., ZEALTERCODE1).
  • ZEALTERCODE0: Use the full new database username (e.g., ZEALTERCODE1).
  • ZEALTERCODE0: Use the password you set for the new database user.
  • ZEALTERCODE0: This is almost always ZEALTERCODE1, but some hosts use a specific IP address or hostname. If ZEALTERCODE2 doesn’t work, check your new host’s documentation or contact their support.
  • Save and Re-upload: Save the modified ZEALTERCODE0 file and upload it back to your WordPress root directory on the new host, overwriting the existing file.

Tip: While editing ZEALTERCODE0, you might also want to add the following lines above the ZEALTERCODE1 line if your site will be using SSL (HTTPS) and it wasn’t configured on your old site:

    define('FORCE_SSL_ADMIN', true);
    if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
       $_SERVER['HTTPS']='on';

Section 8: Updating Site URLs in the Database

Your old database contains references to your old domain name. These need to be updated to the new domain. Failing to do this will result in broken links, missing images, and redirection loops.

There are two primary ways to do this:

Method A: Direct ZEALTERCODE0 Table Edit (for simple domain changes)

This method is suitable if you’re only changing the primary domain (e.g., ZEALTERCODE0 to ZEALTERCODE1) and not moving from HTTP to HTTPS or between subdirectories.

  1. Access phpMyAdmin on Your New Host.
  2. Select Your WordPress Database.
  3. Find the ZEALTERCODE0 Table: (or ZEALTERCODE1 if you customized your database table prefix). Click on it.
  4. Edit ZEALTERCODE0 and ZEALTERCODE1:
  • Look for the ZEALTERCODE0 fields ZEALTERCODE1 and ZEALTERCODE2. These are usually on the first page, but you might need to navigate through pages or use the “Filter rows” feature to find them.
  • Click the “Edit” link (pencil icon) next to both ZEALTERCODE0 and ZEALTERCODE1.
  • In the ZEALTERCODE0 field, change the old URL to your new, full domain URL (e.g., ZEALTERCODE1).
  • Click “Go” to save changes for each.

Method B: Using a Search and Replace Script (Highly Recommended for comprehensive updates)

For a more thorough and robust URL update, especially if you’re changing protocols (HTTP to HTTPS), moving between subdirectories, or simply want to ensure all instances of the old URL (in post content, image paths, etc.) are updated, a search and replace script is best.

  1. Use a Dedicated Search and Replace Tool:
  • Recommendation: Use the “Better Search Replace” plugin after you get your WordPress site somewhat working on the new host (you can manually install it via FTP if you can’t access ZEALTERCODE0 yet).
  • Alternative (for advanced users): A standalone PHP script like “Search and Replace for WordPress Databases” by Interconnect IT. This script is powerful but must be handled with extreme care and deleted immediately after use.
  • Download: Get the script from https://interconnectit.com/products/search-and-replace-for-wordpress-databases/
  • Upload: Upload the entire unzipped folder (e.g., ZEALTERCODE0) via FTP to your WordPress root directory on the new host.
  • Access: Open your web browser and navigate to ZEALTERCODE0 (or whatever the folder name is).
  • Execute: The script will guide you.
  • Enter your old URL (e.g., ZEALTERCODE0 or ZEALTERCODE1).
  • Enter your new URL (e.g., ZEALTERCODE0).
  • Crucially, perform a “dry run” first to see what changes will be made without actually making them. Review the report.
  • If satisfied, perform a “live run.”
  • SECURITY WARNING: DELETE THE ENTIRE SCRIPT FOLDER FROM YOUR SERVER IMMEDIATELY AFTER USE VIA FTP. Leaving it on your server is a severe security risk.

Tip for Search/Replace: Always use the full URL, including ZEALTERCODE0 or ZEALTERCODE1 and ZEALTERCODE2 if applicable, in both the “search” and “replace” fields to avoid partial matches or incorrect replacements.


Section 9: Updating DNS to Point to the New Host

This is the final step to make your website visible on the new hosting provider. DNS (Domain Name System) is what tells browsers where to find your website.

  1. Access Your Domain Registrar:
  • Log in to the control panel of the company where you purchased your domain name (e.g., GoDaddy, Namecheap, Google Domains).
  1. Locate DNS Management / Name Servers:
  • Find the section related to “DNS Management,” “Name Servers,” or “Domain Settings” for your domain.
  1. Update Name Servers (Recommended):
  • The most common method is to change your domain’s name servers to those provided by your new hosting provider. Your new host will have sent you these details (e.g., ZEALTERCODE0, ZEALTERCODE1).
  • Replace your old name servers with these new ones.
  • Alternatively, Update A Records: If you prefer to keep your DNS managed by your registrar (e.g., for email services), you can update the “A record” for your domain to point to the IP address of your new hosting account. Your new host can provide this IP address.
  • Warning: DNS propagation can take anywhere from a few minutes to 24-48 hours globally. During this time, visitors might see your old site, your new site, or encounter temporary “site not found” errors. There’s no way to speed this up, as it depends on how various internet service providers update their caches.
  • Tip: If possible, reduce the “TTL” (Time To Live) settings on your old DNS records to a very low value (e.g., 300 seconds or 5 minutes) a few hours before you initiate the DNS change. This can help speed up propagation once you make the switch.

Section 10: Final Checks and Post-Migration Tasks

Once DNS has propagated (give it at least 24 hours before making final judgments), perform these critical checks.

  1. Clear Caches:
  • Clear your browser cache.
  • If you had a caching plugin installed and copied its cache files, you might need to delete those folders manually via FTP (e.g., ZEALTERCODE0).
  • If your new host has server-side caching, consult their documentation on how to clear it.
  1. Check Site Functionality:
  • Open your website in multiple browsers and in incognito/private mode to bypass local caching.
  • Navigate through all your pages, posts, and custom post types. Ensure all images and embedded media are loading correctly.
  • Test any forms, search functionality, comments, and e-commerce processes.
  • Log in to your WordPress admin panel (ZEALTERCODE0).
  1. Update Permalinks:
  • Even if your permalink structure hasn’t changed, go to ZEALTERCODE0 in your WordPress admin.
  • Simply click the “Save Changes” button (you don’t need to change anything). This action flushes your WordPress rewrite rules, which is crucial after a migration to prevent 404 errors on posts and pages.
  1. Generate New Sitemaps:
  • If you’re using an SEO plugin (like Yoast SEO or Rank Math), generate new XML sitemaps and resubmit them to Google Search Console.
  1. Review PHP Settings (Optional):
  • If you encounter issues like upload limits, slow performance, or specific plugin errors, check your new host’s ZEALTERCODE0 settings (often configurable via cPanel’s “Select PHP Version” or “MultiPHP INI Editor”). Adjust values like ZEALTERCODE1, ZEALTERCODE2, and ZEALTERCODE3 as needed.
  1. Delete the Old Site:
  • Once you are absolutely 100% certain your new site is fully functional, stable, and DNS has propagated globally, you can safely delete the old WordPress installation from your previous hosting account. Keep a final backup of the old site on your local machine or cloud storage for peace of mind.

Conclusion

Congratulations! You’ve successfully migrated your WordPress website manually to a new host using FTP and phpMyAdmin. This process, while requiring careful attention to detail, grants you a profound understanding of your WordPress installation’s inner workings. You now possess a valuable skill that empowers you with greater control over your web presence and makes you less reliant on automated tools. Remember that regular backups remain crucial for the ongoing health and security of your website, regardless of your hosting provider.

Was this helpful?

Previous Article

Building Structured Content: How to Create a Custom Post Type with Custom Fields in WordPress (Using Free Plugins)

Next Article

As an expert educator, I'm here to guide you through a practical and essential task for anyone running a WordPress blog: optimizing your posts for search engines using the powerful Yoast SEO plugin. This tutorial will focus on a specific, hands-on process for a single blog post, moving beyond general advice to give you actionable steps you can implement today.

Write a Comment

Leave a Comment