Moving WAMP and WordPress to another drive

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

I now need to move everything to the D Drive.

Read More

What is the easiest way to do this please?

Thanks

Related posts

Leave a Reply

4 comments

  1. 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

      • binmysqlmysql5.5.24data

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

      • binapacheapache2.2.22confhttpd.conf

      • binmysqlmysql5.5.24my.ini

      • binphpphp5.3.13php.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:UsersAndrewwamp 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 binphpphp5.3.13extphp_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 🙂

  2. 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:wampbinapacheApache2.2.17confhttpd.conf

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

  3. 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:

    • binmariadbmariadb10.4.10confdata[EXISTING WORDPRESS SITES]
    • binmariadbmariadb10.4.10confdatamysql