4

I'm having a big problem with my wamp server for some months now.

I've developed 6 sites locally using wamp server. I had a problem with my computer and copied all my site directories to a hard Disk.

I got a new computer with W8.1 on it and copied back the wamp-folder. I tried to lunch it, but its not working. So i've installed a new wamp server. But i've no idea how to import my site from the old server to the new.

My first problem is that I can't get my old site running on the new wamp installation. I did not save my databases before my computer went down.

But I thing I can find it on the mysql folder from the old system backup. Where and how, I've no idea. So I would like to take my sites from the old wamp and installed it on the new one or get it to work on the new wamp. I've already googled for one month now but I could not find any solution!

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
danyhiol
  • 594
  • 2
  • 7
  • 26

2 Answers2

12

Option 1. ReCreate the old WAMPServer on the new PC

If you have the complete directory structure backed up from your old PC then you can just copy the complete folder structure from your backup to the new PC.

Make sure you put it on the same disk and folder that it was originally installed on, so if it was originally installed in C:\wamp make sure you copy it back to that folder.

Launch the wampmanage.exe from that folder ( C:\wamp\wampmanager.exe )

Using the wampmanager menus do

left click wampmanager -> Apache -> Install Service
left click wampmanager -> MYSQL -> Install Service

WAMPServer should now be as it was before your problem

Windows 8.1 has a blank C:\windows\system32\drivers\etc\hosts file, so you will also need to add all the domains for any Virtual Hosts you had created, but at a minimum it should have these entries.

127.0.0.1  localhost
::1  localhost

Option 2. Add your old Apache/PHP/MYSQL to the new installation of WAMPServer

Remember, one of the big advantages of WAMPServer over other Windows AMP stacks is its ability to have more than one version of each of Apache/PHP/MYSQL in the same WAMPServer instance ready for easy switching between verions of all of these.

So you could keep the new installation and selectively copy over the Apache/PHP/MYSQL versions and then copy over your 6 sites.

So STOP WAMPServer

copy the OLD \wamp\bin\apache\{apacheversion} folder to NEW `\wamp\bin\apache\
copy the OLD \wamp\bin\php\{phpversion} folder to NEW `\wamp\bin\php\
copy the OLD \wamp\bin\mysql\{mysqversion} folder to NEW `\wamp\bin\mysql\

Restart WAMPServer

You should now see that the old and new version of Apache/MYSQL/PHP are available.

Now copy your OLD \wamp\www\??? site folders into NEW \wamp\www\??? and your 6 sites should also be available.

Now you can switch back to the old versions of Apache/PHP/MYSQL and run your sites like that, or backup you databases properly using the old MYSQL version and then restore them to your new MYSQL version

You switch versions using the wampmanager menus like so:-

wampmanager -> Apache -> Version -> (click the required version number )
wampmanager -> MYSQL -> Version -> (click the required version number )
wampmanager -> PHP -> Version -> (click the required version number )
Brenton Scott
  • 153
  • 3
  • 13
RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • Hey RiggsFolly. Thanks for your response. I opt for option one. But i'm having the same problem i got some weeks ago: the apache service can't be started. No problem with the port and i've re-installed it. Besides of that, the wamps icon remains gray. MySql is working for it can be stopped. But Apache is not. Have no idea why or how it can be solved. This is ma hots configurations: ... # localhost name resolution is handled within DNS itself. 127.0.0.1 localhost ::1 localhost # 127.0.0.1 localhost – danyhiol Dec 09 '14 at 20:37
  • Look at your Apache error log, and if that is empty look at the Windows Event Viewer for messages from Apache. Have you tried wampmanager -> Apache -> Test Port 80 – RiggsFolly Dec 09 '14 at 21:14
  • The port 80 is free i've alredy cheked that and disable it on skype.i've found this errors: [Wed Oct 16 22:54:46.268849 2013] [:error] [pid 5656:tid 1572] [client ::1:50879] PHP Fatal error: Maximum execution time of 30 seconds exceeded in C:\\wamp\\www\\www.cb.com\\includes\\database\\database.inc on line 2168, referer: http://localhost/www.cb.com/install.php?profile=standard&locale=en [Wed Oct 16 22:54:46.268849 2013] [:error] [pid 5656:tid 1572] [client ::1:50879] PHP Stack trace:, referer: http://localhost/www.cb.com/install.php?profile=standard&locale=en and others! – danyhiol Dec 09 '14 at 22:28
  • You said that Apache was not starting, why are you looking at the MYSQL log and showing an error from a year ago – RiggsFolly Dec 09 '14 at 22:31
  • I have just had a thought, as you instaled this on a W8/8.1 system, please check that you have all the required MSVC Runtime libraries installed. See this doc for which ones you need [WampServer Forum](http://forum.wampserver.com/read.php?2,123608) – RiggsFolly Dec 09 '14 at 22:36
  • Ohh sry those where from my apache errors logs. I thought it was what you asked for.The port is not in use. And my wamp icon is till gray! – danyhiol Dec 09 '14 at 22:52
  • Have you checked the MSVC runtimes – RiggsFolly Dec 09 '14 at 22:54
  • I've all of thoses MSVC installed on my computer. Can't just understand why apache is'nt starting. – danyhiol Dec 10 '14 at 00:16
0

Six years later, I just resolved this exact same problem. I tried @RiggsFolly's solutions to no avail. Reading logs to try debugging this whole mess became tedious real fast, especially if the paths between the old and the new installations don't match anymore.

Considering a new clean wampserver installation and an old wamp(64) directory from somewhere else:

First, export your mysql's databases.
To do that, use the command line to reach C:\path\to\old\wamp\bin\mysql\mysql{version_number}\bin and start the mysql server with the mysqld command (when you are done exporting, use mysqladmin -u {user name} shutdown). Now, export your databases with mysqldump or any other method you will find around and re-import them inside your new installation.

Transfer the folders of your projects inside www from the old to the new installation.

Recreate your virtual hosts by pointing the paths out to the related pasted folders inside www.

There you go. This way, everything was cleanly imported and you don't have to worry about a dirty setup which will bug at some point.
I hope it helps someone else.

Some_user
  • 61
  • 1
  • 11