Resuming Website Availability Hosted by XAMPP After Moving to Another Computer

Resuming Website Availability Hosted by XAMPP After Moving to Another Computer

As you know, we host WordPress websites on a computer at home via XAMPP (please refer to the Q&A at the end of this article to learn more about it). In certain circumstances, you need to resume the availability of the website hosted by XAMPP instance after you reinstall your Windows operating system or move the drive on which XAMPP instance resides to another computer.

If you’ve never done it before, heading in the wrong direction could consume a lot of your time inadvertently. In my situation, I find myself reinstalling Windows frequently, and I usually have a few portable drives connected to my computer. Recently, I had to move the drive containing the XAMPP instance to my laptop as a portable hard drive because my computer was broken. Regardless of the scenario, I always need access to the websites hosted by the XAMPP instance.

My journey to find the solution

At first, I tried to run xampp-control.exe in root directory of XAMPP instance. This is the XAMPP Control Panel application where you can start Apache HTTP Server and MySQL database server in order to make your website runs properly.

Once I clicked the Start button for Apache and MySQL, both were failed. Unfortunately, the error information provided was not helpful at all. It felt like diving into endless rabbit holes with no resolution in sight.

On the searching results page of google, most of them are forums with a few posts, I read the threads on the forums one by one, without related knowledge to determine which one would hit. And the posts are just totally unrelated, which just make me more confused and frustration.

After about three days had passed, I was still stuck in the dark. I made every effort to remember past experiences of getting a website to work after reinstalling a fresh Windows operating system. I knew I didn’t need to reinstall XAMPP; simply running xampp-control.exe should do the trick. However, this time, I couldn’t figure out why it wasn’t working.

Then I stumbled on a thread on a forum, it says you have to keep the the path of the previous XAMPP instance as the same as your current one. I knew that is the one! Since I made it worked before and I realized that was because of the fresh reinstalling Windows didn’t change the path of the instance of XAMPP. What’s why I made it by just run the xampp-control.exe.

After discovering that the drive letter and path for my portable hard drive were different from what they were on the broken computer, I opened Disk Management. Using the “Change Drive Letter and Paths for…” command, I adjusted the drive letter to match exactly how it was on the previous computer. Then, I launched the XAMPP Control Panel by running xampp-control.exe and clicked the start buttons. Success! It worked like a charm.

Q&As

What is Xampp? XAMPP is a free and open-source cross-platform web server solution stack package developed by Apache Friends. XAMPP allows us to set up a local web server environment on our own computers. This environment includes Apache HTTP Server, MySQL or MariaDB database, and interpreters for PHP and Perl. It’s commonly used for web development and testing purposes, as it provides a convenient way to run and test web applications locally before deploying them to a live server. You can access the XAMPP website(https://www.apacgefriends.org/en/xampp.html) to download the appropriate XAMPP package and install it on your computer.