WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to move my site from Drive C:\ to Drive E:\.

Is there a better way to do this than uninstalling the following:

  • Wordpress
  • PHP
  • MySQL
  • Apache

and re-installing on Drive E:\?

For example, how can I move just the database files and media folder to Drive E:\?

share|improve this question

DISCLAIMER : Only a MySQL DBA, not WordPress expert

You could migrate the database as follows:

Very first thing is to locate the my.ini for MySQL. Search all data volumes until you locate my.ini

Next, login to MySQL and run


This will tell you what folder MySQL data is stored. For this example, let's say it returned C:\Program Files\MySQL\MySQL 5.0\data

You can shutdown mysql from the DOS Command Line as follows

net stop mysql

Next, Make your own folder on Drive E:

mkdir E:\MySQLDB

You can then copy the MySQL Data Folder to Drive E:

cd "C:\Program Files\MySQL\MySQL 5.0\data"
xcopy /s * E:\MySQLDB

Here is the good part: Run notepad on my.ini and replace datadir in it with


Finally, startup mysql

net start mysql

Check the Task Manager. If you see mysqld.exe in the processlist, CONGRATULATIONS !!!

In terms of the other LAMP components, you will have to examine php.ini and other related config files and do the same thing.

share|improve this answer
Thanks, it was mainly MySQL I was worried about, I have a test installation I can later so I will try it out there. Many thanks again. – Tony B Oct 18 '12 at 7:47

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.