Skip to main content
March 28, 2012
Question

Moving WampServer from C to D drive?

  • March 28, 2012
  • 3 replies
  • 37438 views

I'm hoping to find someone in the DW forum who understands how to move a wamp test server to a different drive.  So far, haven't gotten much traction at the WAMP forum.

I'm assuming just moving the files/folder won't work.

Is it a matter of doing a wamp install on the "D" and finding a way to move the data which, after the install, I assume will just be windows file/folder moves.

And then I assume the method used in DW is to update the test server path on the sites that use the local server.

Is this close?

Thanks

Tom

This topic has been closed for replies.

3 replies

New Participant
February 25, 2015

I wanted to move my current installation from D:/wamp to C:/wamp

The real problem would be with mysql databases.

They can be exported and imported into the new installation.

This was not convenient to me as I had many databases with GB's of data.

Though using mysql dump was an option, all that seemed a bit risky to me.

Earlier, in similar situations, I used to create a new installation of wampserver having

the same versions of php, mysql and apache and then replace  bin/mysql/data with the

folder form the old one and manually check for changes to be made in


:\wamp\bin\apache\Apache2.2.21\conf\httpd.conf


\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf

because i have many websites being served by apache


Stopped wampmysqld, wampapache services

exit wamp server

Copied the wamp folder from D: to C: .... had the one in D: intact, just in case.

I used Notepad++ ... made a file search for D:/wamp in "C:\wamp" using file types *.php; *.ini; *.conf; *.txt";

Using the first three ... result was out in a second or so.

After adding .txt, it took a few seconds more, may be a minute.

My system has a i5-3210M Processor and 16 GB Ram.

[Since your system capability affects the time taken for search]

I used find first

and then after assuring myself that what i got was what i was looking for,

I used find and replace

Replaced all D:\wamp with C:\wamp.

Changed the drive letters in the "Target" and "Start In" fields of the Shortcut tab of the start Wamp Server Properties dialog box relating to the shortcut here

C:\ProgramData\Microsoft\Windows\Start Menu\Programs\WampServer\start WampServer

Since i have setup apache and mysql as services I had to change the drive letters relating to the services also

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wampapache

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\wampmysqld

ImagePath    holds the value relating to the path

change the drive letter from d: to c:


started wamp server from the startup folder, and checked.

Done;

Changed the

These are the files affected

@

\wamp\wampmanager.ini (719 hits)

\wamp\bin\apache\Apache2.2.21\bin\php.ini (6 hits)

\wamp\bin\mysql\mysql5.5.16\my.ini (3 hits)

\wamp\bin\php\php5.3.8\php.ini (6 hits)

\wamp\bin\php\php5.3.8\phpForApache.ini (6 hits)

\wamp\alias\phpmyadmin.conf (2 hits)

\wamp\alias\sqlbuddy.conf (2 hits)

\wamp\alias\webgrind.conf (2 hits)

I am including these to give an idea of affected areas.

Anyone trying this route should be conscious that their finding need not be exactly the same.

I came here while searching for a solution at the beginning.

Putting this here assuming that some one else might find it helpful.

Community Expert
March 28, 2012

Are you looking to move the www or the server?  If you want to move the server on Windows, just re-install like Drymetal says.  If you want to move the www folder open up httpd.conf and change the DocumentRoot to the new path and move the testing server files over there and tell DW the new path.

March 29, 2012

Thank you both.  I love the Adobe forums.  Always learn and the feedback makes me get clearer on what I need.

I could use a little help understanding the difference between the server or the www.  Am I correct in understanding the server is the application system and www is where the web sites are stored?  Am I also correct in understanding they don't have to be on the same drive?

If correct, I think its the www I want to move.  The problem I want to avoid is disk space on my C-drive.  I have at least one site that has lots of large files (jpegs and pdfs).  It's that site (content) I want to move to another partition on my HD.  (FYI, wamp is 8Gb and the www folder is almost 7Gb).

Are there reasons one way or the other to guide when to keep the server and the www on the same drive?

Assuming now that it's the www I want to move, I need more detail on the process to www.  I didn't find a file named httpd.conf.  Is it not a file?  EDIT: Found it in Apache.  Will post again if I have further questions.

Tom

Community Expert
March 29, 2012
Am I correct in understanding the server is the application system and www is where the web sites are stored?  Am I also correct in understanding they don't have to be on the same drive?

Yes that is what I was referring to.  You can move the actual sites anywhere you want on your computer without having to move the program files themselves off of the C drive.

Are there reasons one way or the other to guide when to keep the server and the www on the same drive?

For testing servers it really doesn't make a difference there is virtually no traffic and only limited resources being used.  When you start talking larger and more advanced servers, companies will typically put the SQL server on its own to improve performance and leave Apache and PHP on each server.  The drive really doesn't make a difference.  Typically it's on the C drive or dispersed across a RAID configuration, but there is no reason you cannot serve documents from a different drive on your personal testing server.

Drymetal
Inspiring
March 28, 2012

I moved Xampp once to another drive.   The process should be identical.   Here is what I did:

1. I backed up the htdocs folder where all my sites were.  READ: put a copy of this folder in a safe place.

2. I uninstalled Xampp completely.

3. I reinstalled it to the drive I wanted it installed on.

4. I copied the contents from my htdocs folder to the new one.

5. In DW, I updated the path for the websites as you mention above.

It worked and there weren't any issues.  Hope that helps.