Migrating WordPress website from cpanel based shared hosting to VPS server

OS type and version Ubuntu 18.04 64bit with Webmin/Virtualmin/LAMP
Webmin version Webmin 1.990
Virtualmin version 6.17-3
Related packages SUGGESTED

I’m currently hosting my website on cpanel based shared hosting on GoDaddy. I have bought a VPS plan from hostinger.

The VPS has been setup. I have accessed it through SSH. Through SCP, the backup has been transferred to public html folder of VPS server and extracted the archive.

I have setup Vertualmin as well. When I try to move (through SSH) public_html content of my extracted database to the default public_html folder of Vertual min, it says there is no such folder.

I checked my backup size on Veritualmin file manager and it is about 4GB. After extracting it, the sized of extracted folder is in kb.

Did I miss something.

I was following this article

My website URL is

doesn’t sound like your using the migration tool.

Here some docs

Thank you. I have transferred the website files and database to my new server. Before pointing DNS records to my new server I want to check if it is installed correctly and working fine.

Is there any way to check it and test my website in local environment?

You can edit your HOST file on your computer to point to the new IP.

looks like

vmin->services->preview web site

might do what you want, it uses webmin script (rather than a browser) to display the web content

I did that but not but now I’m getting “error establishing database connection” error. There is change database username and change database password tab on the panel but I couldn’t find any tab to view username/password.

The username is the admin username. But I’m not sure how the migration handles the username and password
Where are you see that error, in the webpage?
Are the Database showing ok in the Database tab?

If you use the scripts and install phpMyAdmin, the install should show what being used,

The database connection issue has been resolved (updated correct username, password in wpcofig file) but a new problem has arisen.

When I updated A record in the domain registar DNS settings, SSL lock disappeared and a message appeared after I click on “I accept the risk on browser”. – something like /uploads folder missing. Though I was able to browse the website but some pages we’re accessible. When I clicked on contact page, browser prompted, the page doesn’t exists.

I think the original folder and file structure / path has been changed.

How to fix it?

“Error: Your upload path is not valid or does not exist: /home/n129qdl7f0hk/public_html/wp-content/uploads
Powered by WordPress”

This is the message text. Some plugins on my website are not compatible with photo 7.2 (the phone version currently installed on my new server.

How to update the php to the latest version?

Did you use the migration page to install the domain to Virtualmin. You seem you be having alot of issues.
For SSL, under Server Configuration – SSL Certificates you may need to request new certificates in the Lets Encrypt tab.

Like Cpanel you have a option to change what version you use. Under Server Configuration-PHP options.
But you need to install the ones you need.

If you can switch back to you old hosting you can use this plugin to move your WP, plus its a good backup tool. If you do that, best to wipe the current WP database and files. Use the Script in VM to install a clean WP and install the all in one plugin to import it.

I tried the migration tool that you recommended, but It did not work out. I used the upload to server option. After I click on migrate now button, it keeps itself in processing mode and nothing happens for hours. Sometimes connection gets lost midway. Can I use FTP/SSH method on Cpanel shared hosting server?

Earlier the preview of the website a working on Vertualmin. Now, when I click on the preview website link in a new tab, nothing renders on screen (a blank window with just URL in the address bar).

I just installed the php 8.1 through terminal but on Virtualmin it is still 7.2

You could just use file manger to upload.

Have you run Virtualmin → System Setting → Recheck Configuration after installing PHP 8.1 through the terminal (for which I assume you have followed the instructions here: Multiple PHP Versions – Virtualmin )

In the Server Configuration–PHP option you should see a dropdown to switch versions.

I did the Recheck configuration thing but PHP version is still the same.

There is no such option.

like this?