How to Migrate Your WordPress Website or Project to a Dedicated Server – 3 Methods

Moving your WordPress site to a dedicated server sounds scary, but honestly? It’s stupidly simple once you know the tricks. Doesn’t matter if you’re stuck on shared hosting, VPS, or some random reseller account – the process stays pretty much the same.

I’ve moved hundreds of WordPress sites over the years, and I’ll show you three different ways to do it. Pick whatever works for your setup.

Method 1: The Plugin Way (Easiest)

This is what I use when I’m feeling lazy or dealing with client sites. The All-in-One WP Migration plugin handles everything – files, database, the works.

Getting Started

First, install the plugin on your current WordPress site. Just log into your WordPress dashboard, hit Plugins → Add New, search for “All-in-One WP Migration” and install it. The free version works fine for most sites.

Now here’s where people get stuck – the plugin limits exports to 512MB by default. Your site’s probably bigger than that. Here’s the fix:

Removing the Size Limit

You need to edit one file. Navigate to:

/wp-content/plugins/all-in-one-wp-migration/constants.php

Find this line (usually around line 280-290):

php

define( 'AI1WM_MAX_FILE_SIZE', 536870912 );

Change it to something bigger. I usually go with 5GB:

php

define( 'AI1WM_MAX_FILE_SIZE', 5368709120 );

Save the file. That’s it. No more size warnings.

Creating Your Backup

Head to All-in-One WP Migration → Export in your WordPress dashboard. Choose “File” as your export option. The plugin starts packaging everything – might take a few minutes depending on your site size.

Once done, download the backup file (it’ll have a .wpress extension). This single file contains your entire website.

Importing to Your New Server

Install WordPress fresh on your dedicated server. Don’t bother configuring anything – just get WordPress running with the basic installation.

Install the same All-in-One WP Migration plugin on the new server. Apply the same size limit fix if your backup’s over 512MB.

Go to All-in-One WP Migration → Import, drag and drop your backup file, and wait. The plugin handles everything – database updates, URL changes, file permissions. When it finishes, you’ll get prompted to save permalinks. Do that, and you’re done.

Method 2: Using Your Hosting Panel

Most people have cPanel, Plesk, or something similar. Here’s how to migrate manually through these panels.

Step 1: Package Your Files

The folder structure changes depending on your panel:

  • cPanel: Your files are in public_html
  • Plesk: Look for httpdocs
  • DirectAdmin: Usually public_html or domains/yourdomain.com/public_html

Navigate to your WordPress root folder (where wp-config.php lives). Select all files, right-click, and create a compressed archive. Pick .zip format – it’s universal and works everywhere.

Download this zip file to your computer. Yeah, it might take a while if you’ve got a massive site. Make coffee or something.

Step 2: Export Your Database

In cPanel, find phpMyAdmin (usually under Databases section). In Plesk, it’s under Databases → phpMyAdmin.

Select your WordPress database from the left sidebar. Click Export at the top. Keep the Quick export method and SQL format selected. Hit Go and save the .sql file.

Step 3: Upload to New Server

Create a new database on your dedicated server. Note down the database name, username, and password – you’ll need these.

Upload your zip file to the new server’s web directory. Extract it right there in the file manager. Way faster than uploading individual files.

Import your database through phpMyAdmin on the new server. Select the empty database you created, click Import, choose your .sql file, and let it run.

Step 4: Update Configuration

Edit wp-config.php on your new server. Update these lines with your new database details:

php

define( 'DB_NAME', 'your_new_database' );
define( 'DB_USER', 'your_new_username' );
define( 'DB_PASSWORD', 'your_new_password' );
define( 'DB_HOST', 'localhost' );

Step 5: Fix URLs (If Domain Changed)

If you’re keeping the same domain, skip this. But if you’re changing domains, you need to update the database.

Run these SQL queries in phpMyAdmin:

sql

UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'siteurl';
UPDATE wp_options SET option_value = 'https://newdomain.com' WHERE option_name = 'home';

For content URLs, run:

sql

UPDATE wp_posts SET post_content = REPLACE(post_content, 'https://olddomain.com', 'https://newdomain.com');
UPDATE wp_posts SET guid = REPLACE(guid, 'https://olddomain.com', 'https://newdomain.com');

Method 3: SSH Command Line (For Power Users)

Got SSH access? This method’s the fastest for large sites.

On Your Current Server

SSH into your current server and navigate to your WordPress directory:

Before I begin, I would like to confirm that this method is cross checked by Expertes from https://deltahost.com/dedicated.html

bash

cd /path/to/your/wordpress

Create a compressed backup:

bash

tar -czf wordpress-backup.tar.gz .

Export your database:

bash

mysqldump -u username -p database_name > database-backup.sql

Transfer Files to New Server

You can use SCP directly between servers:

bash

scp wordpress-backup.tar.gz username@newserver:/path/to/destination
scp database-backup.sql username@newserver:/path/to/destination

Or download to your computer first using SFTP, then upload to the new server. Whatever’s easier.

On Your New Server

SSH into the new server. Navigate to where you want WordPress:

bash

cd /var/www/html

Extract your backup:

bash

tar -xzf wordpress-backup.tar.gz

Create a new database:

bash

mysql -u root -p
CREATE DATABASE new_wordpress_db;
CREATE USER 'wp_user'@'localhost' IDENTIFIED BY 'strong_password';
GRANT ALL PRIVILEGES ON new_wordpress_db.* TO 'wp_user'@'localhost';
FLUSH PRIVILEGES;
exit;

Import your database:

bash

mysql -u wp_user -p new_wordpress_db < database-backup.sql

Update wp-config.php with new database credentials. If you changed domains, use wp-cli to update URLs:

bash

wp search-replace 'https://olddomain.com' 'https://newdomain.com' --all-tables

Don’t have wp-cli? Install it:

bash

curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp

Final Steps (For All Methods)

Update DNS

Point your domain to the new server’s IP address. This takes anywhere from 5 minutes to 48 hours to propagate globally. Usually happens within an hour though.

Test Everything

Check these things:

  • Homepage loads
  • Admin panel works
  • Images display properly
  • Forms submit correctly
  • Payment gateways (if you have any)
  • Email notifications

Fix Permissions

Sometimes file permissions get messed up during migration. If you’re getting errors, run these commands via SSH:

bash

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod 400 wp-config.php

Clear Caches

Clear any caching plugins, CDN caches, and browser caches. Half the “migration problems” I see are just old cached content.

Common Issues You Might Hit

White screen of death after migration? Usually means your database prefix is wrong. Check wp-config.php – the $table_prefix value needs to match what’s actually in your database.

Images not showing? Your media URLs might still point to the old server. Run the URL replacement SQL queries again, or use a plugin like Better Search Replace to fix serialized data.

Can’t login to admin? Clear your browser cookies for the domain. WordPress gets confused when you switch servers but keep old session cookies.

Site loads super slow? Your new server might have different PHP settings. Make sure you’re running PHP 7.4 or higher, and that OPcache is enabled.

Quick Migration Checklist

Before starting:

  • Backup everything (seriously, backup twice)
  • Note down current PHP version
  • List active plugins
  • Check total site size

During migration:

  • Disable caching plugins before export
  • Put site in maintenance mode
  • Keep old site running until DNS fully propagates

After migration:

  • Test every major page
  • Check contact forms
  • Verify SSL certificate
  • Re-enable caching
  • Set up automated backups on new server

That’s pretty much it. The whole process takes maybe an hour if you know what you’re doing, couple hours if it’s your first time. The plugin method’s foolproof if you’re nervous about messing with databases. The manual methods give you more control and work better for huge sites.

One last thing – keep your old server running for at least a week after migration. Sometimes issues pop up days later, and it’s nice having a working backup you can switch back to instantly.Retry

Share This Article
Developer, Designer & Publisher. Adam Lyttle creates apps for fun and profit. With 8 successful business exits, and dozens of apps created, My mission is to build a million dollar app portfolio in public.
Exit mobile version