Joomla Templates, WordPress Themes - HotThemes

Move WordPress Site

This tutorial can be also used when you move WordPress site from any location to any location (another host, another folder, subfolder, etc.).

There are several simple steps to move WordPress to the live server while keeping all settings and data previously created through WordPress. In order to achieve that, you would need to have PhpMyAdmin in the source location. We believe everybody who work locally have this handy tool. It comes as a part of all popular solutions for local development, such as XAMPP for Windows and MAMP for Mac. It's also included by almost all hosting companies as a part of all hosting packages.

Steps required to move WordPress site and keep all data

Let's start with this procedure. What you can expect when the procedure is completed is an exact copy of your local WordPress site (source) on the live (target) server.

  1. There are two modified WordPress files (install.php and setup-config.php) that you can download from here. Extract move_wp_site.zip archive. Copy both files to your source WordPress folder /wp-admin (overwrite originals).
  2. Open PhpMyAdmin on your local (source) server. In the left column, click your local (source) WordPress database name. Then click the Export tab. For Export Method, select Custom. Click Select All to select all database tables. Under Object creation options, tick Add DROP TABLE. Under Data creation options, part "Syntax to use when inserting data", select the first option: "Include column names in every INSERT statement". Check if everything is as on our screen shot. You can click GO button finally. Name the SQL file as hot_start.sql and save it to your source WordPress folder /wp-admin.
  3. Open hot_start.sql in your favorite plain text editor. You should replace all instances of local (source) URLS of your WordPress, in example, http://localhost:8888/your_wordpress to this http://%SITE_URL% (use find/replace function of your text editor).
  4. ZIP up your entire WordPress installation now, excluding file wp-config.php. Make sure you packed all files and filders. Make sure you didn't add file wp-config.php to the archive. Upload archive and unpack it on your server. If you can't unpack archive directly on the server, you can upload all files (excluding wp-config.php) via FTP.
  5. Enter your live (target) server URL in any browser. If everything is uploaded properly, you should see the initial screen of the WordPress installation. Make sure you have one empty MySQL database on your server before continuing.
  6. When asked during the WordPress installation process, you should enter correct database connection parameters. This is what you usually do when installing a clean WordPress. In this modified installation, it's not possible to change database prefix parameter.
  7. During installation, it's not possible to change site title and administrator's credentials. However, you can edit all these parameters later through WordPress.
  8. After installation, you would get an exact copy of your source site. WordPress administrator's user/pass will be admin/admin. Make sure you change it immediatelly after first login to WordPress dashboard.

All steps of this tutorial are straightforward. However, you should be extra careful when you are exporting database on your local (source) server using PhpMyAdmin tool (in step 2). Therefore, we will attach a screen shot will correct settings of this export process. Make sure it matches your settings when you are exporting your database.

Move WordPress site to another location

Common mistakes when moving WordPress site

  1. You forgot to change original install.php and setup-config.php files with files from Step 1.
  2. Source database exported improperly. Check the screen shot again.
  3. MySQL export file is not named as hot_start.sql and/or is not copied in /wp-admin folder.
  4. File hot_start.sql not edited properly. All source server's URLS are not changed with http://%SITE_URL% as described in step 3. As a result, new WordPress installation (target) links are leading to the old installation (source).