migrate wordpress/joomla from cpanel to virtualmin

hi folks…has anyone successfully migrated domains running joomla/wordpress from a cpanel server to a server running webmin/virtual?

it seems static websites migrate just fine but when php/mysql is involved it doesn’t work…i get the error “Error establishing a database connection”

anyone seen this before…i touched on this problem in the newbie area and i am sure that php/mysql is running on the virtualmin server…i just thought more people would see it here!

thanks in advance for your help!

ww : )


Normally, databases and such would all be migrated over without a problem.

One thing you could try is to restart MySQL, using the command “/etc/init.d/mysql restart”.

Outside of that – the thing I’d do is review what username, password, and database name your sites are currently setup to use, and I’d make sure that information all still works. Ie, that you’re able to connect to MySQL with that username and password, and that you see the database name within MySQL.


My assumption that any of the parameters “database host”, “database user”, “database password”, “database name” in the Joomla config does not match what was created for MySQL when you imported the website.

You might want to double-check those and compare the configured to the actual values. Also, if MySQL is not running on the same machine, make sure it’s configured to accept connections from any (IP) and not just localhost.

thanks guys…i’m going to mess with it more tonight…hopefully i can figure it out…

worst case…i just start from scratch on the websites using php/mysql…i have all the files since i designed and host them…

I don’t think that starting from scratch will be necessary.

If in doubt, and if the “import from CPanel” thing results in chaos, you can always just extract the web site directory and the database contents the good old “low-level” way (tarball / SQL dump), then set up the new website in Virtualmin in an empty form, and put back the extracted stuff low-level.

Then you’d need to make some little adjustments in the CMS’ config (database location/credentials) and you’re set. Should be a matter of minutes really. :slight_smile:

Concerning the database transfer: I personally use, since I’m living in the “best of both worlds”, a quite nifty Windows MySQL tool named “Navicat” for that purpose. It has a transfer function that can move the full contents of one database over to another, including table structure and data, triggers, stored procedures and all, in a nice GUI, without the need for command line dump creation/replay. Of course, the latter works too if you know the right commands. :slight_smile:

EDIT: And LOL, once more Eric’s and my post kinda “passed each other”, and had nearly the same content, just differently phrased. :slight_smile:

i have a lot to learn…i’m really pretty lost so far…

i’m thinking for me it will be easier to just start with fresh installs for the joomla/wordpress sites…might not be a bad idea anyway since i know i’m dealing with different versions of php/mysql on the two machines…

confused but still moving…