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:\
?
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.