Migrating/duplicating Wordpress site from IIS to VirtualMin

SYSTEM INFORMATION
OS type and version Ubuntu Linux 24.04.1
Webmin version 2.202
Virtualmin version 7.30.3 Pro
Webserver version Apache 2.4.58
Related packages PHP 8.3.6, MariaDB 10.11.8

Hello,

I am completely new to VirtualMin. I have administered Windows IIS servers before (but I may be rusty there).

I have a handful of websites on an old Windows IIS server that I need to move to a new VirtualMin server. Most of them are just .html sites with which I expect no trouble.

I’m having trouble moving the first site that is on Wordpress (one of two on Wordpress). This first one has very little content (virtually none, in fact).

Info on old Windows IIS server: Windows 2016, IIS 10.0.14393.0, PHP Version, WordPress 5.0.2

What I have tried so far:

  1. Create site in VirtualMin,
  2. Install Wordpress in that site in VirtualMin.
  3. Copy all contents of the wordpress directory from IIS to VirtualMin via FTP into public_html directory.
  4. Use MySQL Workbench to export the db, and execute it in Maria DB
  5. Make appropriate DNS changes to point domain to the new VirtualMin install.

This results in a blank web page load - like you get with an incompatible theme or plugin. The theme is a Wordpress created theme (Twenty Seventeen, not a third party theme). No plugins.

Okay, fine. I’ll just make it from scratch, I thought, since this site really has no content that can’t be duplicated quickly.

So, I created a new site in VirtualMin - new.domain.ext.
Installed Wordpress.
Logged in to Wordpress.
Installed the theme we have been using.
Populated the site with content.
Site is ready.
In VirtualMin, moved files up to public_html so the url is just new.domain.ext (rather than new.domain.ext/wordpress).
So far, so good.
Now I’m ready to make this site “live” as domain.ext.
I changed DNS to point to the VirtualMin server and then, under Manage Virtual Server, changed the domain name from new.domain.ext. to domain.ext.
Examined DNS records for accuracy.

But now when I load the site in a browser, it is missing the theme, all images, etc., and when I click anything or add /wp-admin to url to try to get to Wordpress backend, I can see on browser address bar that file paths are broken - still have the “new.domain.ext.”

I have also tried setting up new.domain.ext as a sub-domain in VirtualMin and then moving it up to top-level. Same broken file paths.

When I get to work on the other Wordpress site, I will need to be able to migrate rather than recreate, as it has many posts (with photos, etc.)

If anyone would be so kind as to tell me where I’m going wrong, what step I’m missing, or that I’m going about it all wrong and should be doing it another way, and hold my hand, so to speak to guide me step-by-step, I would be most grateful.

Thanks!
~Katie

You’ve go to look at the logs. The error_log for the domain would be the most likely place to look.

You can install to root directory rather then /wordpress

Another way to migrate would to be use a migration plugin in workpress.

1 Like

wordpress often hardcodes names and paths, some backup/restore/migrate plugins will adjust that sort of stuff on the fly during the migration.

but when you do it by hand, as you did with FTP or when moving bunches of files from a subdirectory up one level, you may need to use a Search/Replace plugin to ‘rename’ the site.

there is also a standalone Search/Replace tool, actually many I believe, that you can use to fix up all the links and references in the database — one is Database Search and Replace Script in PHP | inter.connect however it requires you to register in order to obtain the free software.

as always, make good BACKUPS before messing with the sql database !!

The URLs for your sure are hard coded in the database in serialised json. You cannot just changed the wordpress sites URL.

Before I move a site I change the URL with a plugin called velvet blue, in fact I use the newer fork but cannot remember the name. Once I have moved the sites I login to the admin change the URL in settings and regenerate the paths (can’t remember option top of my head).

Check for htaccess files and enable wp debug to see errors. Also check php error log. With wordpress 5 you might be using an unsupported php version on your virtualmin server.

I didn’t notice that, there is a version 5.9 in the Manage Web Apps and it runs fine with php 8.1.

You maybe right