automatically start xampp on boot

(also applies to xampplite)

What could be the search engine terms for this?

  • start xampp automatically
  • xampp as a service
  • xampp in windows startup folder

Here we go with the story:

I always favored simplicity and ease of life that’s why I have many articles relating to productivity(has also remodeled the links on my blog to simplify things up). Then since I am always using xampp as a development environment. I want it started when I start my PC.

So how it is going to be?

  • as a service
  • as a startup program for windows(more clutter on your taskbar)
  • other things(don’t know/forgot)

As a service

You can set this one by:

  1. Going first to your installation directory(in my case it’s c:\xampplite). It could be somewhere else depending on your installation. Have also my full version in c:\x2\xampp
  2. Once your in the installation directory find xampp-control.exe and click/double-click to launch it.
  3. You should first stop all running instances of your apache2 and mysqld/mysql to do this.
  4. Click the checkmark next to Apache and Mysql with the header name Service.
  5. It will warn you that it’s installing as a service which of course is what we like it to do. Click Yes.
  6. Do step 5 also with Mysql. We’re almost done.
  7. Click Start » then Run
  8. Type services.msc(it can also be done in control panel under administrative tools which is a way lot of click than this one).
  9. Find apache2 and mysql services
  10. Double click each one and set the startup type to Automatic (You will be presented with 3 options: Automatic, Manual, Disabled)
    Automatic – will start it automatically at startup
    Manual – user’s will have to start it up manually i.e. by issuing command like net start apache2
    Disabled – will disable it.
    ****be warned though that any change in the services just like the registry can cause your system to stall***
  11. Click the start button to manually start it(just for the session though). The next restart it’ll be automated.
  12. Do the same with mysql.

As a startup program

  1. Find xampp_start.exe from your installation directory
  2. Press Ctrl+C to copy it or right-click the file and hit copy.
  3. Go to C:\Documents and Settings\Administrator\Start Menu\Programs\Startup and right click on it and hit Paste Shortcut
  4. When you restart it’ll be starting also and you’ll see something like this:

  5. You can stop it by issuing the xampp_stop.exe command in your installation directory.
    ***another worth mentioning is that if you right click again on the shortcut and hit properties, try to change the run option to minimized. This way the shortcut will be on your taskbar once started.

Enjoy.

About these ads

20 thoughts on “automatically start xampp on boot

  1. I am looking for a solution for xampp on Mac and came across your article. I have a question, the article is for Windows, but the interface you have is so Mac, what did you use to get the Mac look?

    Thanks.

    Rich

  2. Hi,

    thanks for that article – you just saved the rest of my hair from being pulled out. I kept getting BSOD (Vista) when trying to start Apache. Figured out that xampp control panel was not setting up Apache or MySql as a service (by going through your steps). Turns out (typical Vista) that I needed to run Xampp control panel as administrator. No error message was being given of course (thanks MS), the service was just not being installed and when I tried to start Apache, the blue screen happened,

    cheers,

    Mike

    Thanks Mike, saving hair loss these days takes a good deal of patience. Knowing I’ve helped you on this cause flatters me. Cheers from the Philippines.

  3. Thank you very much. What I needed was the first part of your post “As a service”. I even only needed steps 1.-6. because the “Startup Type” was already set to “Automatic”. So it all amounted to clicking just the two checkboxes!

    Since I’m no operating system expert, I would really have liked if XAMPP just had checkboxes like this:

    [ ] Start Apache automatically when computer is booted
    [ ] Start MySQL automatically when computer is booted

    This would have helped me out right away. Anyway, thanks again for your help.

  4. Wow, thank you! I’m not new to xampp….but this new installation of xampp for some reason wasn’t a service from the get go (it was last installation). And since I work with websites a lot and scripting I wanted it as a start up service. Used the first solution and it seems to work like a charm.

    *goes to restart*

  5. i am using xampp on windows
    i hve ubuntu 9.04 also on my system
    when i use ubuntu will the xampp work
    shall i need to install xampp on ubuntu too

  6. Hi I had a question from a Windows XP xampp user who has been running Xampp web server over a long period of time.
    During long holidays away from home sometimes apache service has stopped
    the reason is not clear at the moment the reason could have been caused by
    auto updates or problems or perhaps our Broadband host.
    Usually they just a stop of mysql and apache and a restart fixes the problem.

    What they would like to create is an automatic stop and restart of apache
    once a day perhaps early morning.

    My solution to this problem was to set a schedule a task to stop apache mysql services and restart after a selected period of time.

    Locate the xampp folder look for the batch files to start and stop services.
    In note pad enter the following text and save it as redo.bat.

    Create another file with notepad file count.txt . Each time the schedule task is run an extra line is added to count.text. After a few days and you are happy the redo.bat You can remove “copy count.tx >>count.txt”.
    Check the apache log files in xampp/apache/logs/error text file
    If you want to view the log file remotely you could include
    Copy xampp/apache/logs/error text file to somewhere on your website.

    Windows xp does not have a sleep command in batch files.
    Sleep.exe can be downloaded from Windows Server 2003 Resource Kit Tools rktools.exe
    http://www.microsoft.com/downloads/en/details.aspx?FamilyID=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

    @ECHO OFF & SETLOCAL
    PUSHD %~dp0

    ECHO Now we stop MySQL
    xampp_cli.exe stop mysql

    POPD
    sleep 50

    @ECHO OFF & SETLOCAL
    PUSHD %~dp0

    ECHO Now we stop Apache
    xampp_cli.exe stop apache

    POPD
    sleep 10

    echo services should be stopped

    @ECHO OFF & SETLOCAL
    PUSHD %~dp0

    ECHO Now we start Apache
    xampp_cli.exe start apache

    POPD
    sleep 15

    @ECHO OFF & SETLOCAL
    PUSHD %~dp0

    ECHO Now we start MySQL
    xampp_cli.exe start mysql

    POPD
    sleep 10
    echo done
    copy count.tx >>count.txt

    START
    ALL PROGRAMS
    ACCESORRIES
    SYSTEM TOOLS
    SHEDULE TASKS

    Add a scheduled task redo.bat

    TASK
    BROWSE to \xampp\redo.bat
    [tick] Enabled scheduled task runs at secified time.

    Enter the schedule task details.

    SCHEDULE
    Daily, enter start time, every day

    This schedule will restart apache once a day.

    While viewing the schedule tasks it may be a good idea stop the google updater.
    I like google browser but not the pesky updater installs itself in three places:
    And keeps updating and every reboot and at the most inappropriate moment.
    And several times during the day

    Take a look at the tasks in Windows XP

    START
    ALL PROGRAMS
    ACCESORRIES
    SYSTEM TOOLS
    SHEDULE TASKS
    To remove these goto
    Start > Run > MSCONFIG > STARTUP and disable “GoogleUpdate” APPLY
    Also disable “GoogleUpdate” in SERVICES

    Good Luck
    Tony
    http://eclug.co.uk

    • Thanks Tony for the elaborate solution. If given this task, I would set up a small linux server for this, a chance for learning.

      But either way, it’s a good solution you have in there. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s