Backup, Restore and Migrate


Manual Transfer Any site+

  1. Back up your website files
  2. You are going to need wp-content folder only and the wp-config.php file. So we will download this wp-content folder and wp-config.php with our ftp or via filemanager of our hosting control panel(which will be more quicker).


  3. Export The WordPress Database
  4. Login to the cPanel account of your web server and open the phpMyAdmin application. Select the database that contains our WordPress installation from the list on the left hand sidebar and once selected click on the Export tab on the navigation menu.


    If your database is large, you may find it quicker to click the 'custom' radio button then from the output secion, select 'zipped' from the 'Compression' dropdown, then click 'go'. This will give you a zipped up version of your database which is usually quicker to restore from.

    After exporting the db in a sql format we have to do the url replace becoz we might have some direct url insertion instead of dynamic url


  5. Defining New Domain & Search/Replace Old Domain
  6. Before importing the database:

    If you are moving to a new/different domain then you should read over this step, if not, then you can skip this because you don’t have to update your site to point to a different domain.

    One issue people always seem to have when moving their site is that they’ve added links to other posts on their site or inserted images directly by pointing to a URL on the server, causing these to break when moved over to a new domain.

    Changing Site URL: By doing a search and replace for the old domain and replacing with the new domain you’ll also be altering the site_url and home url values in the database (Changing the Site URL) which will ensure that when you try to log into your site on the new domain it doesn’t try and redirect you over to the old domain.

    Velbet Blues Update URLs

    If you move your WordPress website to a new domain name, you will find that internal links to pages and references to images are not updated. Instead, these links and references will point to your old domain name. This plugin fixes that problem by helping you change old URLs and links in your website.

    Since all the content is stored in the database and has references to the old URL, it must be updated to the new url in database. Handling this is a big challenge. Under wp-config.php enter the following command if your URL does not correspond to your actual site’s:

    define('WP_HOME', 'http://my-domain.com');
    define('WP_SITEURL', 'http://my-domain.com');
    

    These command statements tell WordPress to ignore the values in the database and use the home and site URL values that you specify in the wp-config.php file.


  7. Create The WordPress Database On Your New Host Server & Install Wordpress
  8. Before we can begin the migration to the new web host, we need to create an environment for a WordPress installation. To do this you must create a database that you can import your SQL data into.

    Write down the database name, the new MySQL username, host name and its password. You will need them soon.


  9. Edit the wp-config.php File
  10. Browse to the folder on your server where you downloaded your website files to. In that folder there is a file called wp-config.php and make the following changes:

    define('DB_NAME', 'db_name');
    define('DB_USER', 'db_user');
    define('DB_PASSWORD', 'db_pass');
    define( 'DB_HOST', 'db_host' ); 
    

    We have to match the table prefix of both database. If our new database table prefix is not the same prefix of old one then we will change it in our wp-config.php file like below. We will add the old ones table prefix here.

    $table_prefix  = 'wp_';

    These credentials are from your new created database where you are transferring the sites


  11. Import Your Database
  12. before import the database file into new host database we will open sql file in our code editor and change database name if the database name is not same.

    CREATE DATABASE IF NOT EXISTS `db_name` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
    USE `db_name`;
    

    There after we will replace the old url with new url with find & replace option of our code editor

    Now we will go to our phpmyadmin and open the newly created db and import the mySql db file

    Once our WordPress database has been restored, we should see the message "Import has been successfully finished".

    Do not use a rich text editor such as Microsoft Word or it will damage the file and cause corruption.

    Unknown collation: ‘utf8mb4_unicode_520_ci’

    I have a WordPress website on my local WAMP server. But when I upload its database to live server, I get error #1273 – Unknown collation: ‘utf8mb4_unicode_520_ci’


  13. Upload The WordPress Files To Your New Host
  14. Delete the newly installed wordpress wp-content folder and Upload wp-content folder of the site you are moving.

    Sometimes the custom css inside the theme optoins may not transfer. In that case we have to do it manually

Some Issues may create after the mirgrations

  1. Plugin like wp-hide-my-ip or similar can be a issue. The site will not get present url where we will migrate.
  2. Some additional css and option settings inside the theme options may not transfer. In that case we have to do it manually.

Other Information

We can get a little closer to the metal if we back using SSH. SSH (Secure Shell) is a network protocol that allows you to securely access your server over encrypted connection.

First, you will need to connect to the server. You need to have the server's IP address, username, and password. You'll also need a command line client like Terminal for Mac or Putty for Windows.

Link your site to the new domain

When you’ve got external links on your site, they might break when you move them to a new domain. This is why it’s important that you update the links to point to the new domain. You can do this either manually, or via a plugin like Better Search and Replace or Search and Replace.

Some web hosts allow permissions like 777 for your files. When you transfer files from one host to another, the corresponding permissions are moved too. Such file permissions present an enormous security risk. If you are switching to a host that considers security a priority (which is a good thing) it will unfortunately result in an “Internal Server Error” page. This is to do with the correct permissions issues.

Keeping Your Domain Name and URLs

Moving your domain without changing the Home and Site URLs of your WordPress site is very simple, and in most cases can be done by moving the files.


codex.wordpress.org/Moving_WordPress

Server to server file tranfer with php+

content from varadha

How to Increase Maximum Upload File Size in WordPress +

1. Changing maximum upload size in cPanel

If your hosting provider is using cPanel and allows changing PHP settings, you can easily increase maximum file upload size:


2. Update .htaccess file

php_value upload_max_filesize 128M
php_value post_max_size 128M
php_value memory_limit 256M
php_value max_execution_time 300
php_value max_input_time 300

3. Update wp-config.php file

define('WP_MEMORY_LIMIT', '128M');

how-to-increase-the-maximum-file-upload-size-in-wordpress

All plugins free versions has got limitations. They wont work with large backup or migration. You have to go with their premium or pro version

Some Popular Backup Plugins+

WPvivid Plugin


All in one WP Migration

This plugin exports your WordPress website including the database, media files, plugins and themes with no technical knowledge required. Upload your site to a different location with a drag and drop into WordPress. There is an option to apply an unlimited number of find and replace operations on your database during the export process. The plugin will also fix any serialisation problems that occur during the find/replace operation.

Moving WordPress site to new domain - All in one WP Migration(Video)

how-to-increase-maximum-upload-file-size-in-wordpress

You can increase the upload limit to 512MB using a free extension.


Duplicator

Duplicator creates a package that bundles all the site’s plugins, themes, content, database, and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers, and pretty much any location a WordPress site can be hosted. WordPress is not required for installation since the package contains all site files.

Video Tutorial for Duplicator


UpdraftPlus

UpdraftPlus simplifies backups and restoration. It is the world’s highest ranking and most popular scheduled backup plugin, with over two million currently-active installs. Backup your files and database backups into the cloud and restore with a single click!

Backup into the cloud directly to Dropbox, Google Drive, Amazon S3 (or compatible), UpdraftVault, Rackspace Cloud, FTP, DreamObjects, Openstack Swift, and email. The paid version also backs up to Microsoft OneDrive, Microsoft Azure, Google Cloud Storage, Backblaze B2, SFTP, SCP, and WebDAV.

For mirgration or move to a different location you have to use UpdraftPlus premium addon UpdraftPlus Migrator

WP Migrate DB

WP Migrate DB exports your database as a MySQL data dump (much like phpMyAdmin), does a find and replace on URLs and file paths, handles serialized data, then allows you to save it to your computer as an SQL file. To complete the migration, you need to use a database management tool (e.g. phpMyAdmin) to import the SQL file to your database, replacing your existing database. It is perfect for developers who need to migrate fresh data from the production site to their local install, or migrate their locally developed site to a staging or production server.


BackWPup – WordPress Backup Plugin

The backup plugin BackWPup can be used to save your complete installation including /wp-content/ and push them to an external Backup Service, like Dropbox, S3, FTP and many more, see list below. With a single backup .zip file you are able to easily restore an installation. Please understand: this free version will not be supported as good as the BackWPup Pro version. With our premium version you get first class support and more features.


Migrate Guru: Migrate & Clone WordPress Free

Migrate Guru is the fastest way to migrate WordPress sites. It simplifies difficult WordPress migrations (e.g. multi-site networks, 200 GB sites, etc.).

Powered by BlogVault (an onboarding partner of top WordPress hosts in the world), Migrate Guru uses intelligent processes on its own servers… So there is ZERO risk to your sites. It automatically rewrites URLs, bypasses import-export scripts, and handles serialised data. It also can clone WordPress sites without any manual work, add-ons, or additional tools.


Better Search Replace

When moving your WordPress site to a new domain or server, you will likely run into a need to run a search/replace on the database for everything to work correctly. Fortunately, there are several plugins available for this task, however, all have a different approach to a few key features. This plugin consolidates the best features from these plugins, incorporating the following features in one simple plugin:

Entering a wrong search or replace string could damage your database. Because of this, it is always adviseable to have a backup of your database before using this plugin.

Velvet Blues Update URLs

If you move your WordPress website to a new domain name, you will find that internal links to pages and references to images are not updated. Instead, these links and references will point to your old domain name. This plugin fixes that problem by helping you change old urls and links in your website.


© 2025 My Wordpress collection by Mizanur Rahman