How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (2024)

When it comes to developing WordPress in a local environment, XAMPP is a popularand trusted tool. However, that doesn’t mean you won’t ever run into errors. One you might come across is the HTTP error 404 “The requested resource is not found.”

If you encounter this issue, there are several ways to try to resolve it. These fixes aren’t overly complicated and don’t take a lot of time to perform. With a little patience, you should be back up and running in no time. In this article, we’ll explain what the error “requested resource is not found” in XAMPP is. Then, we’ll share five tips for how to fix the problem and get you back on track.

What the XAMPP HTTP Error 404 “The Requested Resource Is Not Found” Means

A 404 error is one of many HTTP status codes that are sent from a server to a client. In general, this error indicates that the browser is requesting something that can’t be found on the server.

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (1)

It can be challenging to determine the source of a 404 error, as there are several potential causes. These can include:

  • The domain no longer exists.
  • The requested resource has been deleted or moved to a different URL.
  • The URL was mistyped into the browser.

You’ve likely run into these situations when browsing the web. However, you can encounter 404 errors when working on localhostwith XAMPPas well. In this case, you may also see the message expressed as Error 404 “the object is not found.”

How to Fix the HTTP Error 404 “The Requested Resource Is Not Found” in XAMPP (5 Tips)

Now that you understand what this particular XAMPP error is, let’s explore how to fix it using the following five tips.

1. Be Sure You Typed the URL Correctly

Before you attempt any other fixes, we recommend double-checking that you haven’t mistyped or included anything unnecessary in the URL. For example, a common mistake is including “XAMPP” when it’s not needed:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (2)

Errant keystrokes are a frequent cause of this error but are also easy to fix. If you’re sure you’ve entered the correct URL and are still having problems, there are a few other solutions you can try.

2. Check Your.htaccessFile

A missing .htaccess filecan also cause a 404 error. Therefore, it’s important to be sure the file exists in the correct location, especially if you see the “the object is not found” version of the error.

To find the file, you can navigate to the XAMPP folderon your computer. Within this folder, there will be another one called htdocs. This folder is likely where you installed WordPresswhen you initially set up your website. You should find the.htaccessfile there:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (3)

If you are using a macOS, the file will still be in the htdocsfolder. However, you’ll find it via Applications >Xampp >xamppfiles >htdocs.

If the file doesn’t exist, you’ll need to create one. To do this, open your preferred text editor and name the file “.htaccess”. The exact code you need to paste into it may vary depending on your setup, but it should look something like this:

# BEGIN WordPressRewriteEngine OnRewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]RewriteBase /RewriteRule ^index.php$ - [L]RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule . /index.php [L]# END WordPress

Save the file to the folder you created for your website. Even if you don’t discover an obvious problem with your.htaccessfile, sometimes simply replacing it with a fresh one can fix the error.

3. Deactivate and Uninstall New Plugins

When you install plugins, they may make changes to your code or database that can cause this 404 error. Starting with your newer plugins, you can try deactivating or uninstalling them to see if that fixes the problem.

Plugins can be deactivated from the admin dashboard of your local site. To do so, in the menu on the left of the screen, click on Plugins >Installed Plugins. To deactivate one, click on the Deactivatelink under the name of the plugin:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (4)

If you want to uninstall a plugin completely, you can do so from the same screen. First, deactivate the plugin, then click on the red Delete link that below the name of the plugin:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (5)

Even if you haven’t installed any plugins recently, this is worth trying, since updates to plugins can sometimes cause problems. You can also deactivate all of your plugins at once by renaming the pluginsfolder in your site’s directory.

4. Check Your Database for Changes

Even if you uninstall a problematic plugin, the changes it made to your site may continue to cause issues. If you suspect this is the case, you may want to check your local site’s database for changes.

To access the database, you can type http://localhost/phpmyadmin into your browser. Alternatively, from the XAMPP control panel, you can click on the Adminbutton next to MySQLto open phpMyAdmin.

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (6)

Now you can click on the Databasestab at the top of the screen. Locate your website’s database in the list to view the tables it contains:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (7)

Next, you’ll want to comb through the database and look for anything that shouldn’t be there. Some plugins will add entirely new tables to your database. To remove an unnecessary table, click on the Droplink to its right:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (8)

Most plugins will make changes to the wp_optionstable, so you’ll want to have a look at that entry. You can also check the core WordPress tables. While plugins shouldn’t change these tables, it is possible, especially if you installed a nulled plugin.

If you’re unsure what your database or tables are supposed to look like, you may want to create a new WordPress site. Then you can compare the fresh database to yours.

5. Check Your Apache Configuration

If you’re having trouble opening a PHP file, your Apache configurationcould be incorrect. More specifically, there may be a conflict with the port that Apache is trying to use.

Apache uses port 80 by default, but you may need to change it if you already have something listening on that port. To find a free port, you can click on the Netstatbutton in the XAMPP control panel:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (9)

If port 80 is already in use, or if you just prefer to leave it open, you can go ahead and choose a free port number. We’ll use “8080” for this example, but you can use whichever port you’d like.

Next, you’ll need to edit the httpd.conffile. You can find it in C:\xampp\apache\config if you’re using Windows:

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (10)

If you’re working on macOS, you can find this file in the /etc/apache2directory. You can locate it using the Go to Folderoption in Finder.

Once you’ve found the file, go ahead and open it in your preferred text editor. There are two lines you’ll need to edit:

Listen 80ServerName localhost:80

Change the Listenport number to 8080 and the ServerNameto localhost:8080. Now you can save and close the file.

At this point, you can restart the Apache server and attempt to access localhost:8080 (or whichever port you’re using) in your browser. If you’re not successful, you’ll need to edit the http-ssl.conffile. Windows users can find this file in xampp\apache\conf\extra.

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (11)

Once again, you should be able to locate this file on a macOS by typing /etc/apache2 into Finder’s Go to Folder.

Once located, you can open the file in a text editor. There are three lines that you’ll need to update in this file:

Listen 443<VirtualHost _default_:443>ServerName localhost:443

Locate each of these lines in the file and change the values to “8080”. After saving the file, you can restart the Apache server again. Now you should be able to access localhost:8080 in your browser.

Summary

The “requested resource is not found” error can undoubtedly slow you down when you’re working with XAMPP. There are a few possible causes for this issue. Fortunately, the solutions for resolving it aren’t complicated.

In this post, we covered a few ways you can attempt to fix the XAMPP Error 404. You can start by ensuring that you’ve entered the URL correctly, and move on from there. With any luck, you’ll be back to work in no time.

If you enjoyed this tutorial, then you’ll love our support. All Kinsta’s hosting plans include 24/7 support from our veteran WordPress developers and engineers. Check out our planstoday to learn more!

How to Fix the XAMPP HTTP Error 404 "The Requested Resource Is Not Found" (2024)
Top Articles
Latest Posts
Article information

Author: Aracelis Kilback

Last Updated:

Views: 5924

Rating: 4.3 / 5 (44 voted)

Reviews: 83% of readers found this page helpful

Author information

Name: Aracelis Kilback

Birthday: 1994-11-22

Address: Apt. 895 30151 Green Plain, Lake Mariela, RI 98141

Phone: +5992291857476

Job: Legal Officer

Hobby: LARPing, role-playing games, Slacklining, Reading, Inline skating, Brazilian jiu-jitsu, Dance

Introduction: My name is Aracelis Kilback, I am a nice, gentle, agreeable, joyous, attractive, combative, gifted person who loves writing and wants to share my knowledge and understanding with you.