Steps to perform during migration:
- Install VPS with CentOS 7 without any LAMP stack.
- configure the x11 window and forwarding
- make a directory named as /bitnami to be used as installed directory
- Download the WordPress NGINX stack installer from bitnami.
- Login as root user, installation should be done as root user to avoid later complexities.
- upload the file to the server or download it from the server.
- install the perl module first https://docs.bitnami.com/installer/faq/linux-faq/administration/install-perl-linux/
- change the installer file permission to 755 to execute.
- execute the installer.
- Welcome window will appear click next.
- select installation folder.
- create admin account.
- supply the blog name.
- configure smtp settings skip it.
- deploy to the cloud skip it.
- ready to install.
- Installation completed.
- Go to the web browser and supply the ip address to see the website is up and running.
- Upload your current website theme folder to the new installation wp-content directory.
- Install the uploaded theme at the new installation.
- Take backup of your existing site by All-in-one-WP-Migration utility.
- Download the backup to your local PC.
- Upload the website backup to the new installation and import.
- If needed increase the file upload size from /INSTALLDIR/APPNAME/php/etc/php.ini file
- Edit the upload_max_filesize and optionally post_max_size to the appropriate value according to your export file size.
- Edit the opt/bitnami/apps/APP_NAME/conf/nginx-app.conf file to change the client_max_body_size to greater size of the export file.
- Import the website export file by All-in-one-WP-Migration plugin at new website.
- When import finish check to see everything is imported from your existing website to the new website.
- Create a new admin user for mysql database to connect from remote hosts and do admin tasks, don’t use root for security reason.
- CREATE USER ‘myadmin’@’localhost’ IDENTIFIED BY ‘3-PKC77y^VtJUVJ*’;
GRANT ALL PRIVILEGES ON *.* TO ‘myadmin’@’localhost’ WITH GRANT OPTION;
CREATE USER ‘myadmin’@’%’ IDENTIFIED BY ‘3-PKC77y^VtJUVJ*’;
GRANT ALL PRIVILEGES ON *.* TO ‘myadmin’@’%’ WITH GRANT OPTION;
- CREATE USER ‘myadmin’@’localhost’ IDENTIFIED BY ‘3-PKC77y^VtJUVJ*’;
- Change your website database if it was a custom one rather default ‘bitnami_wordpress’.
- Export the database from the original site.
- Create and import the database to the new site by MySQL workbench.
- Grant appropriate permissions to the new imported database ‘xyz_wordpress‘ to the bn_wordpress user.
- Edit the wp-config.php file to match the database and table prefix of the imported database.
- Check to see the website is ok now.
- Export other custom application databases from the original site and import into the new one if needed.
- Enable Lets Encrypt SSL at the new website:
- Configure SSL by lego. here
- Check the firewall is active and running:
- service firewalld status
- Enable firewall if not running:
- service firewalld start
- Configure the ethernet NIC
- sudo firewall-cmd –zone=public –change-interface=eth0
- Add services or port to firewall:
- firewall-cmd –permanent –zone=public –add-service=https
- firewall-cmd –permanent –zone=public –add-service=http
- firewall-cmd –permanent –zone=public –add-port=3306/tcp
- firewall-cmd –permanent –zone=public –add-port=80/tcp
- firewall-cmd –permanent –zone=public –add-port=443/tcp
- Reload the firewall:
- firewall-cmd –reload
- Enable HTTPS support with NGINX. here
- Restart the NGINX server.
- sudo /bitnami/wordpresspro-5.2.3-0/ctlscript.sh restart nginx
- Force HTTPS redirection with NGINX. here
- Enable MySQL SSL connection.