1

I have WAMP installed in my C Drive and a Wordpress website too.

I now need to move everything to the D Drive.

What is the easiest way to do this please?

Thanks

Satch3000
  • 47,356
  • 86
  • 216
  • 346

4 Answers4

4

To supplement @balexandre's answer, here's exactly what I had to do to move my WAMP installation to another location (though not on another drive—same concept) while preserving MySQL settings and databases as well as Apache and PHP configurations. My existing site was very simple, using only the services in the acronym (Apache, MySQL, PHP) and literally nothing else (e.g. Python, Perl, etc.) Apply some of your own judgment at each step; this is only meant to be a guiding example.

Moving WAMP to a new folder or drive location

  1. Copy wamp (or whatever the root directory's called—the one that contains www) to wamp-bak.

  2. Install WAMP where you want it to go. Unlike most Windows programs which only give you options like repair and uninstall for already-installed programs, the WAMP installer is more like an extracter, so you can simply run it again and choose a different root directory, i.e. you don't have to uninstall it first. If you do choose to uninstall it, beware: it'll modify your original wamp directory!

  3. Copy and paste the following directories from wamp-bak to their respective locations in the new wamp root directory, selecting the option(s) to merge folders and overwrite all files:

    • \www\

    • \bin\mysql\mysql5.5.24\data\

  4. Copy and paste the following files from wamp-bak to the new wamp,

    • bin\apache\apache2.2.22\conf\httpd.conf

    • bin\mysql\mysql5.5.24\my.ini

    • bin\php\php5.3.13\php.ini

    and in each of these files, do a search-and-replace to substitute all instances of the old path (e.g. C:\wamp for me) with the new path (e.g. C:\Users\Andrew\wamp for me).

  5. If you installed any custom .dll's and such, you'll have to recall them and copy them over. For example, I had to copy over bin\php\php5.3.13\ext\php_curl.dll, which I installed in order to resolve this issue.

If the above fails or you can't recall what else you might need to copy over,

then instead of step 4, try simply copying all of bin just as you copied all of www and again search-and-replace in the three aforementioned configuration files. In fact, if you have some effective way of searching within files, e.g. Cygwin/UnxUtils/GnuWin32 + grep, then see if the old path needs to replaced in any other configuration files that I may not have needed to. Then share what file that was in a comment so as to benefit everyone here :-)

Community
  • 1
  • 1
Andrew Cheong
  • 29,362
  • 15
  • 90
  • 145
3

if you have everything set up correctly, it's a matter of telling WAMP what directory is your wordpress installation.

you can change it manually going to httpd.conf or default-server.conf and edit the DocumentRoot

on my machine, the file is in

C:\wamp\bin\apache\Apache2.2.17\conf\httpd.conf

change DocumentRoot "c:/wamp/www/" to DocumentRoot "d:/wamp/www/" (line 178)

balexandre
  • 73,608
  • 45
  • 233
  • 342
  • Also, don't forget to change `$wwwDir = $c_installDir.'/www';` to `$wwwDir = 'yourpath/www';` in `wamp/script/config.inc.php` otherwise your `php_error.txt` log will become extremely big due to something that causes refresh.php to loop infinitely on a readdir() statement thanks to an unchecked file handle. – SuperSpy Apr 04 '15 at 19:47
0

Install WAMP on drive D. Then you can just move the folder htdocs from drive C. If you use relative paths in the reference, then it will work fine.

Gromozeka
  • 126
  • 1
0

As an addition to @andrewcheong's excellent post you might want to consider these steps as well. I had to implement them to get everything to work correctly.

Copy and paste the following also:

  • bin\mariadb\mariadb10.4.10\conf\data\[EXISTING WORDPRESS SITES]
  • bin\mariadb\mariadb10.4.10\conf\data\mysql
cab
  • 33
  • 6