Import Wordpress site and database to Virtualmin

electra.xsxtc.uk (77.68.100.23)|Operating system|Ubuntu Linux 20.04.6|
|—|—|—|—|
|Webmin version|2.101
|Usermin version|2.001|
|Virtualmin version|7.8.2
|Authentic theme version|21.09.3 |
|Kernel and CPU|Linux 5.4.0-166-generic on x86_64|
|All installed packages are up to date|

Hi

I started a discussion in January 2022 when I first tried to move my website from the current host (Bluehost) to my Virtualmin server hosted on my own VPS. I had to stop as we had a house fire that destroyed both my houses (the existing and the one I had nearly finished building) and frankly, it has taken until now to get back to this. I am under pressure as the site is down and my Bluehost account expires November 29.

I have copied the sites I need via ftp to my home computer.
I have exported the databases for each site to my home computer.
I have redirected all DNS to my virtualmin setup and dnschecker confirms they are now fine.

I have followed the most useful suggestion from Ilya:

After successful installation of Virtualmin with install.sh script and going through the post-install wizard, do the following:

1. Create new virtual server with the domain name used to host your WordPress site and make sure that it’s working (can be resolved (DNS working), can request SSL certificate and etc.)
2. Go to Install Scripts page and install new WordPress for this newly created domain
3. Go to File Manager and upload files from your previous WordPress installation under virtual server public_html directory, overwriting WordPress files that were just installed
4. Go to Edit Databases page, choose the database for WordPress (named usually as yourdomain_wordpress), click manage and on the opened page click Execute SQL, where you can run SQL from file using an upload of your existing dump for your WordPress website.

That’s all.

Perhaps you would also need to manually adjust few option on wp_options table (for example, if domain name was changed) and adjust database settings in wp-config.php file (or simply not overwrite it on described above stage #3).

I have worked with the most important site, uk.boutiquefrenchwine.com. I have set up a top level new virtual server for the domain. The database name is uk_bfw. I then installed the phpmyadmin script and the wordpress script.

I went to the domain and it was a blank page (not surprising as there is no content) and it allowed me to access the wp-admin functions.

I then used file manager and overwrote the public-html folder that had been created with the version I had taken from the original site over ftp.

Now when I try to access the domain or the domain wp-admin functions, I just get the:

Welcome to the famous five-minute WordPress installation process!

page which I am not sure if I should have completed before when I first set the site up?

I completed it with the same user name I previously defined for the virtual server and then I am able to access both the site and the wp-admin functions. But it is weird!

The website is the basic wordpress site and not the pages I want to display. At the same time all of the plugins for the site are listed. So it appears that some, but not all of the original site is being read.

File Manager has not changed or been overwritten so the site is coming from some new database entries. When I look at phpmyadmin, the famous five minute etc. has inserted several new tables with the prefix bfw_ instead of uk_bfw_ and these are taking preference. I have no idea where this prefix has come from as I did not enter it as there was no option to define the database tables prefix when doing the Wordpress installation process.

If I select these tables and drop them, the server does not pickup my defined database tables of uk_bfw but instead redirects me again to the:

Welcome to the famous five-minute WordPress installation process!

wp-config correctly calls the uk_bfw database but for some reason virtualmin or apache are only seeing data tables that start with bfw_.

At one stage I was able to rename all the table prefixes in one go and that got me to see the pages correctly on the site but that option now appears to be now working. I press Continue and nothing happens.

So I have taken each of the default tables and renamed them the bfw_ and I can access the login page. however it does not accept the current admin user. So I used the old admin user credentials and I can log in but only to my customer account on key site. if I try to access the wp-admin functions I get a message that tells me I am not allowed to access the page.

If I drop all the tables from the database and then re-import the database (point 4 in Ilya’s instructions) into the now empty database, it takes me back to the:

Welcome to the famous five-minute WordPress installation process!

Which is absurd because all the config files are correct but for some reason they are being ignored.

How do I get out of this loop and get the virtual server, apache and Wordpress to behave themselves please?

Geoff

There are documentation on the internet on how to manually transfer wordpress sites.
I use All-in-One WP Migration addon if you had a running wp site you need to transfer, sounds like you don’t.

Have you followed any instructions like this?

1 Like

Hi,

I have no specifically read that one but I have read as much as I can about it. I have tried the migration tool bit it simply would not work for me which is why I am now doing it manually. I am sure I am almost there and it will be a small tweak that allows it to work.

I do not understand the workings of the servers well enough to understand why the prefix of the database is changed and why the prefix that is generated by virtualmin is not working when it is called in the wp-config file correctly. It is clearly going to the right database but the prefix is preventing it from working properly. I could just start again and change the prefix but that is the system telling me how to work not me controlling the system!

I will however read it through so thanks for the link.

Stefan,

Thank you, thank you, thank you!

Despite reading it several times I did not realise that the table prefix was defined in wp-config. I changed it from bfw_ to uk_bfw_ and magically I got access to both the site and the control panel.

One last issue though and I think this is a virtualmin not Wordpress or apache issue.

Screenshot 2023-11-02 at 09.55.26

The image above shows the tabs on my browser. When visiting other pages the correct image comes up on the tab but for some reason when first going to the site url it displays the icon from another site on the server (my blog for the reconstruction of a barn for our new home).

I can manage this favicon from the WP control panel but the setting is correct for the site. It is only the first page access that has the issue which is why I think it is a Virtualmin issue. I have checked in a private browser and the result is the same so it is not a caching issue.

Can anyone tell me what is going on and how I can correct it please?

PS: Thanks also to all those who helped me this time and back in January 2022. It is much appreciated.

Geoff

I have gone through the site and confirm that it is only when I go to the Home page (which is set to a page called News that the favicon is wrong. All other pages follow the site configuration.

In my opinion, use Duplicator Pro (https://duplicator.com/) - there is a free version.
It’s very simple and automatic, you don’t need to change anything.
I even use them as scheduled backups.

1 Like

Virtualmin would have no control on a wp favicon.
This may help

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.