Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

1 Answer 1

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

SHOW VARIABLES LIKE 'datadir';

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

[mysqld]
datadir=E:/MySQLDB

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

 
discard

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.