I recently moved my domain from a C-Panel hosted domain (and Email to Google G Suite (my guide here)) to a self-managed Digital Ocean domain (my LetsEncrypt Guide here, my Digital Ocean guide here, my AWS setup guide here, my Vultr setup guide here) and needed to transfer my WordPress site.
Buy a domain name from Namecheap here.
I had issues with a CPanel domain on the hosts (Uber/Netregistry) as they were migrating domains and the NetRegstry chat rep said I needed to phone Uber for support. No thanks, I’m going self-managed and saving a dollar.
I backed up my old WordPress site files with FTP (and my database (sql export) on my old site and zipped it up and uploaded it to a public location as I did not want to set up FTP on my new site. More info on this here.
This downloaded mg 1GB backup zip.
I install unzip onto Ubuntu.
I unzipped the WordPress instance with Unzip (my blog lives under a blog folder).
I created an /index.html to redirect people to the blog folder.
<html> <head> <meta http-equiv="Refresh" content="1; url=http://simon.fearby.com/blog/"> </head> <body>Loading <a href="http://thesubdomain.thedomain.com/blog/">http://thesubdomain.thedomain.com/blog/</a></body></html>
I updated my NGINX configuration to ensure WordPress worked.
I checked my databases with mysql (command line) to ensure MySQL was up.
mysql -u root -p Enter password: ************************************ mysql> SHOW DATABSES;
I uploaded https://www.adminer.org/ to my site. I opened my wp-config.php and got db and username and created the user and assigned it to the database in Adminer.
I had a SQL backup of my site buy from experience I had not modify the SQL file before importing it (replace MyISAM with InnoDB).
You can read more about me previously moving a CPanel domain with email to a self managed VPS and Gmail.
I tried to import my 7mb sql file into the database with Adminer.
But it kept timing out (I suspect PHP upload limits were set to 2MB).
I fond my php.ini files (4 of them). No PHP file was found when I ran which PHP command was run and opened that folder.
I had to make the following PHP.ini changes to allow the larger file size to restore uploads with the Adminer utility (default is 2mb).
I had to make the following changes to nginx.conf (to prevent 404 errors on the database upload)
I restarted nginx and php
nginx -t nginx -s reload sudo /etc/init.d/nginx restart sudo service php7.0-fpm restart
I was now able to import the database
I navigated to the WordPress and all was good (even had SSL as I set that up on the new server)..\\
Conclusion
I now have a faster WordPress on a server I manager with SSL.
Donate and make this blog better
Ask a question or recommend an article
[contact-form-7 id=”30″ title=”Ask a Question”]
v1.1 NetRegistry info