is it possible to move xampp folder without spoiling anythin

Problems with the Windows version of XAMPP, questions, comments, and anything related.

is it possible to move xampp folder without spoiling anythin

Postby thosecars82 » 01. October 2010 21:00

Hello

I have a question

Do you know whether it is possible to move the whole xampp folder once it is installed to a different location to the original where it was installed without ruining the xampp installation? Would that bring any trouble after trying to use xampp again in the new location?
Otherwise, should I follow the xampp installation's steps from the beginning if I wanted to install xampp in a different location?

Thanks
thosecars82
 
Posts: 3
Joined: 12. April 2010 14:20

Re: is it possible to move xampp folder without spoiling anythin

Postby JonB » 02. October 2010 00:26

The basic asnwer is yes and I have done it. I have a complete instruction set just about done, but I want to test ONE little thing before I post it (and grab a bite to eat).

Here's a note in the FAQ about it:
http://www.apachefriends.org/en/faq-xam ... ml#mvxampp

I felt that wasn't very complete (just my idea)

Okay -- I was right, there are a few gotchas. I've got almost all written up, (I know I know... but I had to run a clean install, move it, and then test each of my assumptions). The good news is, it works exactly correctly now! :shock:

All good - I'll post it as soon as I can (maybe tonight, otherwise, tomorrow a.m.).

8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: is it possible to move xampp folder without spoiling anythin

Postby JonB » 02. October 2010 13:15

Hi

Yes. you can move XAMPP, but the process is counter-intuitive. XAMMP (other than the installer) doesn't use the Windows Registry -- so the programs can be moved. There's a built-in script to re-align XAMPP. BUT you run it AFTER you have moved XAMPP.

http://www.apachefriends.org/en/faq-xam ... ml#mvxampp

And of course you could just COPY the contents of the XAMPP folder into a new folder you have created (rather than using the MOVE command), so if it fails nothing is lost. Remove when all is good. :)

So the order is:

If you have used the Install as Service option, you will need to Unistall the servers that are running as Services when you look in the XAMPP Control Panel. Also -- obviously -- the servers can't be running when you wish to move.

DO BACKUPS FIRST! (See below)

Copy/Move the contents of the XAMPP folder to your new XAMPP folder with Windows Explorer. This should take maybe three to five minutes depending on how big your XAMPP installation is..

Once the copy is complete, in the root of the new XAMPP folder, start the XAMPP Control Panel manually by double-clicking on 'xampp-control.exe'.

Now, Use the XAMPP relocate tool by clicking on the Setup button.

When setup starts, you should get this message:

"Current directory does not match configured directory.
I must relocate the XAMPP paths correctly.

Should I proceed? (y/x=exit setup): y "

press Return to accept the default.

Unless you have some very good reason, answer 'n' (no) to the question "Should I make a portable XAMPP without drive letters?"

The XAMMP Relocator will fix the basic settings in the configuration files for each of its components, and you will get the message

"XAMPP is ready to use.
Press <Return> to continue:"

Press 'Return' like it says, and then 'x' to exit the XAMPP shell script.

If you are running any of the servers as a service, reinstall them now by checking the Svc boxes in the XAMPP control panel.

Remove the old XAMPP control panel shortcut on your desktop, and make a new one by right clicking on 'xampp-control.exe' and selecting Send to > Desktop (create shortcut) in the Context menu.

Now - Fix Third Party Programs/Scripts that require configuration or paths, and you make changes to Apache and PHP configuration files where you have made any customizations.

Restart your machine and make sure everything was working right!

Congratulations, it's working!! -- you are a genius - :mrgreen:

BTW - I keep a whole development site on a USB stick and move it from machine to machine.

A few extra answers based on my own experiences -

If you have any real investment of your time and effort on your XAMPP installation, or the scripts and programs that are installed on it: BE SURE TO BACK IT ALL UP. If you have blogs or forums (or anything else) that is dependent on MySQL, BE SURE TO BACK THEM UP ALSO (separately) with phpMyAdmin.(or use mysqldump.exe). Ugly, ugly things can happen when you're a little bit overtired or frustrated, so give yourself a break and make a backup first. It's very easy to SELECT ALL, AND THEN TOUCH THE WRONG KEY -- only to watch everything you have disappear. :shock:

If you have things like Vhosts in Apache where you set an absolute path, that will need to be fixed manually (if that path is changing also).

In General: Anything you added, that didn't come with XAMPP or that is not inside the XAMPP folder will need manual fixes - that would include blogs like WordPress (maybe) and most forum software, (as almost all of them contain installation paths and settings). Then any third-party scripts and applications have absolute paths in them, you should check their FAQ pages or forums to determine this before you try to move things.

I say maybe on WordPress, as I found it depends on a few fine points - such as if you have a media library - at least in WP 2.9.2 I had to fix the path for the Upload directory in phpMyAdmin after moving from one server to another..

Edit: Shiver me timbers mateys - I think the 'relocator' even fixed my desktop Icon/Shortcut! AND the Start Menu items - XAMPP MUST be perfect :mrgreen:

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: is it possible to move xampp folder without spoiling any

Postby harryg123 » 07. June 2011 12:25

Running Win XP SP 3. I have an xampp installation on my desktop machine, c:\xampp. I recently copied the entire directory over to my laptop, c:\xampp

Now I get the an “Authentication Required” popup with the following message: “A username and password are being requested by http://localhost. The site says, "xammp user"”

The username and password I enter are exactly what it says in c:\xampp\xamppy\phpmyadmin\config.inc.php:

$cfg['Servers'][$i]['auth_type'] = 'http'; // Authentication method (config, http or cookie based)
$cfg['Servers'][$i]['host'] = 'localhost';
$cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['user'] = 'root';
$cfg['Servers'][$i]['password'] = 'mypassword';
$cfg['Servers'][$i]['extension'] = 'mysql';
$cfg['Servers'][$i]['AllowNoPassword'] = true;

Can’t log in with no username and/or password either.

Running setup_xampp.bat yeilds a “Sorry, but ... nothing to do!” response.

Finally, you mention in your post that one ought to backup the “important” folders. OK. But what is “important?” I mean, I backed up _everything_ and it doesn’t work.

Thanks,

Harry
harryg123
 
Posts: 3
Joined: 24. April 2011 06:17

Re: is it possible to move xampp folder without spoiling any

Postby Altrea » 07. June 2011 23:06

harryg123 wrote:I have an xampp installation on my desktop machine, c:\xampp.

Which XAMPP version?

harryg123 wrote:Now I get the an “Authentication Required” popup with the following message: “A username and password are being requested by http://localhost. The site says, "xammp user"”

The username and password I enter are exactly what it says in c:\xampp\xamppy\phpmyadmin\config.inc.php:

Thats wrong. XAMPP does have different authentification methods. There are HTTP-Authentification (with .htaccess and .htpasswd files) to secure folders (like this message you get), Database-Users like the one your phpMyAdmin config.inc.php file must know to login successfully to your MySQL Server, and your Scripts may have their own Users too.

So your problem is not the Database User, but the HTTP authentification user.
If you have forgotten which user you have setted by your xampp security script or another method, simply delete the .htaccess file in your c:\xampp\htdocs\xampp\ folder.

harryg123 wrote:Finally, you mention in your post that one ought to backup the “important” folders. OK. But what is “important?”

That depends on your usage of the XAMPP components. If you use your Apache HTTP Server in standard configuration your \xampp\htdocs\ Folder where your scripts are saved is important.
If you use Databases for your scripts, your \xampp\mysql\data\ folder is important, too.
If you change much in the configuration of the XAMPP single components the configuration files are important to backup too.
If you have moved your DocumentRoot or make use of VHosts with different DocumentRoots then maybe there are several other folders which should be backuped too.
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 41 guests