VestaCP CentOS 6.5 - How to move WP Websites with plugins and themes to new server
#1
I've had plenty of struggles historically with installing WordPress sites on a VPS from backup using VestaCP with FileZilla FTP and was very happy during my last VPS experience to find a simple and effective way to move a WP Website with plugins and themes intact from one server to another - or from an old dusty backup to the VPS.  I use the Duplicator Plugin that historically was not working that well with VestaCP however discovered with my latest VestaCP installation that it was working perfectly now.  VestaCP must have got its act together for Duplicator Plugin.  Duplicator Plugin is quite finicky with the zip modules it requires and processing setup in the destination server has to be precise.  With VestaCP it is usually fast as Nginx looks after the speed end of things. 

Here are my steps for moving the WP site.  Note:  I use CentOS 6.5 MINIMAL installation - I like the combo of Apache/Nginx in VestaCP

1. Create backup of my WP site with the Duplicator Plugin 
Install Duplicator Plugin in the WordPress site I want to clone, copy, move or back up.  This is done by creating a backup package that will consist of an Installer.php and Backup.zip files.  Save the two files to the hard disk of my computer.  Ideally one should always do that after one has made changes to the Website as it is a valuable backup as well as re-install tool.

2. Prepare domain I'm going to use with adding nameservers 
I do this usually 24 hours or so before I start to work on the WP site so as to give time for the DNS to propagate.  I go to the Registrar of the Domain Account and then add the name servers to my domain.  Most of my domains are with NameCheap and NameCheap has a neat tool under Advanced DNS where one can create two name servers from one IP.  So this is what I usually do with a VPS.  Have a paid domain at NameCheap and create two nameservers from one IP.  I then add those two name servers to the domain in my Domain Registrar Account.

3. Install VestaCP from the command line 
I use CentOS 6.5 minimal OS installation.  Minimal installation of the OS is an absolute must otherwise you are bound to come up with problems when VestaCP is installed.  For installation all you need to do is go to the VestaCP installation page and then use the installation guide for compiling your own installation script:

https://vestacp.com/install/

Here is my script combo:
Web:  nginx-apache
FTP: None
Mail: None
DNS: Named
Firewall:  iptables + fail2ban
Additional Repository: Remi
File System Quota: No
Hostname:  domain.com (without anything in front of it)
E-mail address:  email@dot.com
Password: passw

You then SSH to your VPS, download the installer and add the installation script after which VestaCP provides you with a login and password:


Code:
curl -O http://vestacp.com/pub/vst-install.sh



Code:
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin yes --clamav yes --mysql yes --postgresql no --hostname domain.com --email email@dot.com --password letsdoit



4. Set up VestaCP
Most important part is to get your name servers sorted as fast as you can.  The earlier the better so the DNS can propagate. 

1. Click on the packages on the top menu of VestaCP and put in your name servers
2. Click on User - add/edit the user account and put in your name servers of your domain
3. Click on Domains - either add on or edit the domain - select default Web and Proxy templates
4. Click on DNS and check that the name servers are there.  If not, you can't add them to the DNS you have to go back and check they are in the package, domains and user accounts.

5. Create Database in VestaCP
Create Database in VestaCP using the VestaCP Database tool.  Make a good record of the Database, User and Password as you will need those for Duplicator re-installation.

6. Install WP from the Command Line

Code:
cd /home/admin/web/domain.net/public_html


Code:
wget http://wordpress.org/latest.tar.gz


Code:
tar --strip-components=1 -xvf latest.tar.gz

Code:
rm latest.tar.gz

Code:
chown admin -R *


The last command is very important otherwise you won't be able to download and install plugins and themes from your WP Dashboard.

7. Upload the installer.php and backup.zip folders to the root of the domain you are using for the destination WP site

8. Type domain.com/installer.php in the address line of your browser 
If everything went well with the Duplicator Plugin it will come up with the installer.php page. 

Note:  The Installer Page provides the “Create New Database” as the default option. CHANGE the default option to “Connect and Remove All Data”. Then enter Database, Database User and Password details and allow Duplicator to install backup site.

9.  When the login dialog screen appears for WordPress enter the OLD WP user name and password 

10.  Then save the permalinks as instructed and delete the installation files and cache
The Duplicator will guide you to those.





Users browsing this thread: 1 Guest(s)

Switch to mobile version

Sponsors: Ftpit - ZXPlay - GalaxyHostPlus - Verelox- HostUS - Host4Fun - Evolution-Host - NodeBlade - HostDare - VPSMost


BitCoin donations: 1DQxbstaTb5SWk6QC2gFeQUTFR64JX4cEo