Please check out our holiday schedule for support availability

How do I migrate my WordPress Site to Pagely?

Last Updated -


Please note, this article assumes you have already deployed a working WordPress application with Pagely, and that you are migrating an existing WordPress application's contents from your current host, to your Pagely. For cloning Pagely applications, please visit our Cloning Sites with Pagely Sync Article.
 

Method 1 - SFTP only

Step One - Grabbing a copy of your database

You'll need to export your database from your current host provider and download to your local computer. This can be done with...
  • PhpMyAdmin
  • contacting your current host provider's support staff
  • Hosts dashboard (CPanel in many cases)
  • If you are unsure, it is best to contact your host's support team to find out what options are available for you to export the sql file. If Pagely has migrated a few of your applications already, we may know where to loo as well.

Step Two - connect to your host provider

Using your SFTP client, connect to your current host provider and download your wp-content folder locally. This, along with your sql file, is what makes your PERSONAL WordPress application. Assuming everything has been kept up to date, importing your wp-content and sql file into any WordPress application will make this process more seemless.
 

Step Three - connect to your Pagely server

You'll need to connect to your new Pagely VPS via SFTP. Instructions on setting up SFTP with Pagely can be found here.
 
You can also review our video for a visual a more visual tutorial...
 
Once that's done, you'll connect and click on your sites directory...
 
sites_dir.png
 
Please place the contents of your sql file in the sites directory and NOT a directory deeper, as most directories further down will be a public. This would be a major security issue
 
4. Once that's done, click on your application name's directory. This will be your public directory. Go ahead and delete the contents if your wp-content directory, or the directory itself. Then add your wp-content folder via SFTP here.
/Sites/appName/
5. With SFTP alone you will not be able to import your sql file. You will have to contact support to enable PhpMyAdmin. They will provide instructions on navigating to the application. Once they have, navigate to PhpMyAdmin and import your .sql file form your old host
 
and you're done!
 
 

Method 2 - CLI (Command Line Interface)

This is the more advanced option, and will require some command line interface knowledge to successfully undertake. Dot your i's and cross your T's on this one.

Step One - grabbing a copy of your database

Option 1: WP-CLI - Most host providers utilize WP-CLI, or WordPress Command line interface this is by far the easiest option as a simple method to grab a copy of your database is to run the following command in your webroot directory...

wp db export

This will create a sql file, which contains a copy of your database.

Option 2: MySQL cli - An alternative to this that's often available is MySQL CLI the following command can be utilized in your host's webroot...

mysqldump -p -u username database_name > dbname.sql

The suggested command to run may vary depending on your host provider. Please contact them to be certain you export the file properly.

BE ADVISED: You should NEVER leave a copy of your sql file in your webroot directory. this is a dangerous practice that we even scold ourselves for doing. Please clean up after yourself for your own security.

Step Two - transferring files over.

This will require knowledge of rsync, or some similar transfer utility command line tool to complete this task. Check "HowTo Use rsync For Transferring Files Under Linux or UNIX" for more information. 

You'll also need to set up SSH access at Pagely. The following Pagely Article: Setting up SSH access for your new VPS Account will help. 

You can also review our video for a visual a more visual tutorial...

 

Please note that Pagely handles WordPress core files. As such, the only directory that MUST be transferred over is the wp-content folder.

Please also note your SQL file should NEVER remain in your public directory. We're repeating this with good reason. To be doubly cautious, transfer your sql file one directory above in...

/Sites/

Step Three - importing your database

If you are temporarily leaving your sql file in...

/Sites/AppName/

Which is your webroot directory, you can simply run the following command...

wp db import db.sql

and your file will be imported. If you had placed your sql file in...

/Sites/

Then run the following command.

wp db import --path=/Sites/

and you're done!

Method 3 Hire help

Hire a Professional to help. We recommend using the following agencies:

Related Topics

Pagely is the Managed WordPress Hosting Platform designed to exceed the needs of media, business, and Enterprise customers alike. We help the world's biggest brands scale WordPress.

Copyright © 2006-2017 Pagely, Inc. All rights reserved.
Pagely® and WordPress® are registered trademarks.

Pagely
Powered by Zendesk