Your SlideShare is downloading. ×
0
www.limecanvas.com
You may have to do one or all of the following to
move a WordPress site from one server/folder
to another.
Physically rel...
You could move them one-by-one using FTP.
BUT that would take ages..
Pack entire WordPress site into one archive
• Zip, Gzip, lhz, 7z …whatever
The method:
Download the archive to local machi...
Command line for SSH:
tar –zcvrf archive.tar.gz ./
Note: tar by itself doesn’t compress
-z = gzip -c = create -v = verbose...
File Manager on cPanel: Compress/Uncompress
FTP = “File Transfer Protocol”
– PRO: Has been around since dawn of Interwebs
– PRO: Vastly supported
– CON: Two channels....
Two completely different methods!
FTPS = “Secure FTP”
Port 990
Uses two data streams. One for data + one for control
SSL e...
Command line :-P
WinSCP (free)
Has a global password to protect accounts
PuTTY (free)
SSH client
IDEs
PHPStorm and Dreamwe...
1. At old location, pack existing site into a compressed archive
file
2. Download archive file to local machine
3. FTP arc...
Two Considerations before attempting to move the database
1. “Am I moving the database to a new database server?”
Will mos...
URLs in your content or links to images/resources on your posts
and pages are stored in the database.
Some, URLs will be s...
Free version
• https://wordpress.org/plugins/wp-migrate-db/
• Renames URLs in serialized data
• Save DB file as SQL or sql...
Upload the sql.gz
file that was
generated by WP
Migrate DB
PHPMyAdmin or PHP environment may have upload limitations.
Three tricks:
1. Use SSH
mysql –u username –p database_name < f...
1. Use WP Migrate DB
Rename old domain to new
domain
2. Generate .sql.gz file
3. Load into blank DB using
PHPMyAdmin
Last thing to do is to tell WordPress where the database is
Edit the wp-config.php file
define('DB_NAME', 'DBNAME');
defin...
Read Japh’s “Migrating a Site Quickly with SSH and WP-CLI”
SSH
– scp ./* wil@newdomain.com:~/limeca/wordpress
WP-CLI “a co...
XCloner Plugin (free) http://www.xcloner.com/
OK – if you’re not changing domain or URL structure i.e. “cloning”
BackupBud...
When moving your site watch out for…
.htaccess file (hidden file in your site root folder)
– This file is used for caching...
[1] newfillmore.com
[3] maran.com
[4] vonbandersnatch.files.wordpress.com
[7] limecanvas.com
[11] memegenerator.net
[15] l...
WordPress Migrations - Moving WordPress to Another Server
WordPress Migrations - Moving WordPress to Another Server
Upcoming SlideShare
Loading in...5
×

WordPress Migrations - Moving WordPress to Another Server

204

Published on

How to successfully move your WordPress site from one server to another using a variety of methods and tools.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
204
On Slideshare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "WordPress Migrations - Moving WordPress to Another Server"

  1. 1. www.limecanvas.com
  2. 2. You may have to do one or all of the following to move a WordPress site from one server/folder to another. Physically relocate the files (PHP, images etc.) Physically relocate the database (SQL) Reconfigure WordPress to point to new database Rename URLs in database from old domain/folder to new domain/folder
  3. 3. You could move them one-by-one using FTP.
  4. 4. BUT that would take ages..
  5. 5. Pack entire WordPress site into one archive • Zip, Gzip, lhz, 7z …whatever The method: Download the archive to local machine then upload and unpack at new location
  6. 6. Command line for SSH: tar –zcvrf archive.tar.gz ./ Note: tar by itself doesn’t compress -z = gzip -c = create -v = verbose -f = file -r = recursive Unpacking: tar –zxvf archive.tar.gz (-x = extract)
  7. 7. File Manager on cPanel: Compress/Uncompress
  8. 8. FTP = “File Transfer Protocol” – PRO: Has been around since dawn of Interwebs – PRO: Vastly supported – CON: Two channels. One for data, one for control. Bit of overhead – CON: No encryption. None. Nadda. Tiddly Squat. Zero! N O T H I N G Try to avoid using FTP where possible. However, most shared hosting plans do not support secure FTP WTF is that all about?
  9. 9. Two completely different methods! FTPS = “Secure FTP” Port 990 Uses two data streams. One for data + one for control SSL encryption. Widely supported. SFTP = “SSH File Transfer Protocol” Port 22 Uses one data stream for both control and data Requires SSH keys management. More secure. Pros/Cons: https://www.eldos.com/security/articles/4672.php?page=all
  10. 10. Command line :-P WinSCP (free) Has a global password to protect accounts PuTTY (free) SSH client IDEs PHPStorm and Dreamweaver have built in FTP clients
  11. 11. 1. At old location, pack existing site into a compressed archive file 2. Download archive file to local machine 3. FTP archive file up to new location (securely if possible) 4. Unpack archive file at new location Congrats - Your WordPress site files are now at the new location.
  12. 12. Two Considerations before attempting to move the database 1. “Am I moving the database to a new database server?” Will mostly be yes. 2. “Am I moving the site to a new domain or folder structure?” e.g. myolddomain.com  mynewdomain.com mydomain.com/wordpress  mydomain.com/blog If so, you will also need to rename the old domain URLs that are stored in the database, to your new domain
  13. 13. URLs in your content or links to images/resources on your posts and pages are stored in the database. Some, URLs will be stored along with other related information (e.g post/media ID, attributes) – an array of information Arrays are stored in the DB as serialized data. e.g. {s:26:”http://www.limecanvas.com/”} s:26 = number of characters in the string By simply renaming URLs in the SQL file using a text editor, the number of characters in the string will be incorrect and that will cause data issues. You need to update both.
  14. 14. Free version • https://wordpress.org/plugins/wp-migrate-db/ • Renames URLs in serialized data • Save DB file as SQL or sql.gz Paid version • https://deliciousbrains.com/wp-migrate-db-pro/ • Pull/Push directly to DB server • Detects environmental limitations to avoid failures • Select whatever tables you want to migrate • Support • Sync media files
  15. 15. Upload the sql.gz file that was generated by WP Migrate DB
  16. 16. PHPMyAdmin or PHP environment may have upload limitations. Three tricks: 1. Use SSH mysql –u username –p database_name < file.sql or for a .sql.gz zcat file.sql.gz | mysql -u username –p database_name 2. Use BigDump script http://www.ozerov.de/bigdump/ 3. Split SQL file into manageable chunks Not recommended. Easy to break SQL statements.
  17. 17. 1. Use WP Migrate DB Rename old domain to new domain 2. Generate .sql.gz file 3. Load into blank DB using PHPMyAdmin
  18. 18. Last thing to do is to tell WordPress where the database is Edit the wp-config.php file define('DB_NAME', 'DBNAME'); define('DB_USER', 'DBUSERNAME'); define('DB_PASSWORD', 'DBPASSWORD'); define('DB_HOST', 'localhost');
  19. 19. Read Japh’s “Migrating a Site Quickly with SSH and WP-CLI” SSH – scp ./* wil@newdomain.com:~/limeca/wordpress WP-CLI “a command line interface for WordPress” – wp db export - l gzip > database.sql.gz – wp core download – gunzip < database.sql.gz | wp db import – wp search-replace olddomain.com newdomain.com – then edit the wp-config.php file
  20. 20. XCloner Plugin (free) http://www.xcloner.com/ OK – if you’re not changing domain or URL structure i.e. “cloning” BackupBuddy (paid) http://ithemes.com/purchase/backupbuddy/ Using the “Move” feature. Deploy to a new domain. Git (free) http://git-scm.com/ From “master” branch, pull on or push to server. Doesn’t do the DB though on its own (use hooks)
  21. 21. When moving your site watch out for… .htaccess file (hidden file in your site root folder) – This file is used for caching and permalinks. It may contain references to your old domain/URL structure. If in doubt, don’t move it to the new server and let WordPress create a new one by saving your Permalinks settings in the moved site. Caching/Security Plugins – These may also use the .htaccess file to add rewrite rules which may contain the old domain/URL structure. Disabled them before the move and then activate them again on the new server.
  22. 22. [1] newfillmore.com [3] maran.com [4] vonbandersnatch.files.wordpress.com [7] limecanvas.com [11] memegenerator.net [15] limecanvas.com [16] limecanvas.com [18] memegenerator.net [19] memegenerator.net
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×