Skip to main content
March 28, 2012
Question

Moving WampServer from C to D drive?

  • March 28, 2012
  • 3 replies
  • 37460 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

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

Participating Frequently
January 27, 2013

Honestly, if I were you, JFWily2, I would opt for a totally integrated package such as EasyPHP, then once you get it installed and run it (it will appear in SysTray, where you can double-click it and verify that both the Apache and MySQL servers are running (you'll see a green light for each if they are), then just right-click the icon again in SysTray (down by the clock) and choose "Administration". There you can see if there are updates waiting for you, as well as any other helpful modules (I downloaded and installed the whole nine yards, making sure to install them in the EasyPHP folder in Program Files, that way EVERYTHING meshes perfectly, no snags!).

If you wish to put your website creations (php, etc. files) on a separate drive than the system drive where you installed EasyPHP, that is easily done as long as you link to it from inside your "Administration" page (as a Local Files > Alias), and there you will have the opportunity to map the exact path to the folder in question.

For this to work, you'll need to remove the "www" folder from the EasyPHP folder in Program Files and put it on the other (target) drive, and then you can fix up as many subfolders (Aliases) under "www" (your document root in Apache) at the new location as you like.

You will need to set up a password for your MySQL server as the root user in order to secure it from outside tampering. If you don't know the exact procedure for this, then come back and I'll tell you how to do it, but first, you need to set the basics up as suggested in the above, either preserving the "www" folder in the EasyPHP folder in Program Files, or removing it and placing it on a drive where your files won't get lost if something ghastly happens to your system drive, God forbid!

If you wish to set it all up maverick style, then let the world know that you are still looking for an answer to your original query.

Whatever the case may be,

Good Luck!


AdobeFlat,

Thanks for the informative post.  I'll look into easyPHP, although initially I had attempted running myPhpAdmin, a handy GUI but had an issue there too.  It wasn't providing the expected login features to load a database or even connect to mySQL as the GUI is intended to do.  And so going about it "Maverick", I've come to find definately has been a burden and required that I delve further than I had wanted from the get go.  Nonetheless, I've got to find a way to get the mySQL and PHP acknowledging one another so that Dreamweaver server behavior and other dynamic functions can work properly.  I'm hoping to not have to scrap the installs that I'm working with now as I've already invested the time to learn about the file packages and so forth.  I'll check out the easyPHP though, but I'm running IIS and according to your post, it's compatabile with Apache but also with IIS?  I'll reply if any solution arises.

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.