Cloning a virtual server with WordPress installed

CentOS Linux 8.5.2111

Hello,
I am Philippe from France.
I cloned one of my servers (toutle05.fr built with Wordpress) using the option of Virtualmin.
The cloned server is toutle95.fr
After doing this, I modified the wp-config file to name the database and indicate the code and password. But when I want to access my new site I have a blank page with the error message “File not found” Could someone tell me which file it is?
Thank you for your help.
Have a good day

Take a look at the .htaccess file in the public_html directory to see if the old domain is hard-coded there, and if so, change it to the new domain.

The easiest way to move a Wordpress site is with the All-In-One Migration tool for Wordpress. If you don’t get this figured out, just use that plugin. Here’s how it works:

You install the plugin on the Wordpress site you want to move. You make a backup and download it.

You go to your new virtual server setup and use the installer script to install Wordpress. Then you go to that installation of Wordpress, install the All-In-One Migration tool plugin on it, then use it to restore your Wordpress site.

I’ve used it dozens of times and it works flawlessly. It has never, ever failed.

1 Like

Hello @calport ,
Thanks for your answer.
There is not a hard-coded reference of my mywebsite.
I think that I will follow the solution given by @Gomez_Adams
Have a good day

Hello @Gomez_Adams
Thank you fior your answer.
I will folow your solution.
I willgive you the result in a next rteply.
Have a good day

Yes, let us know how it goes.

For the benefit of others who land up here, I found this link to contain all the relevant steps for those who wish to change the domain name of a WordPress website when cloning a virtual server in Virtualmin.

With Wordpress, it’s always database issues that cause the problem. Restoring the site to an already existing database solves all of that.

Yes, it can be done without the plugin, and much quicker actually. But that would take explaining how to do it all and may or may not “sink in”.

That’s why I always bring up the plugin. Usually, you never hear from the people again once they find out about it.

Hello @Gomez_Adams

In export procedure there is possibility to find and replace text
If I use it will it change text in my original site or in the future database ?

Thanks for yopur help

Don’t mess with that.

You have to change the site urls as mentioned above…

And you also have to change the urls in the db for every post. It is hard coded in the db on every post made. Export db, extract it, open with simple text editor. It is simply text. Do a find and replace on the url. Then import this new text as SQL via webmin db page.

@Gomez_Adams
@scotwnw
Thanks for your answers.
I am in the process of cloning my server with the All in One Migration plugin.
For the moment it is going well but it is long because my Internet speed is not very high at the moment.
I will come back to make a point on this subject when this is finished.
Thank you again for your help.

1 Like

Thank you @Gomez_Adams for your good advice

The Plugin All in One WP Migration is very simple to use but also extremely effective.
Internal links in database tables are replaced during import.

1 Like

Good deal! Glad you got everything sorted.

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