When it comes to developing WordPress in a local environment, XAMPP is a popular and 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, a 404 error indicates that the browser is requesting something that can’t be found on the server.

A typical 404 error.

An HTTP 404 error.

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 localhost with XAMPP as well. In this case, you may also see the message expressed as Error 404 “the object is not found.”

Info

Looking for a powerful tool for local WordPress development? DevKinsta features one-click site creation, built-in HTTPS, powerful email and database management tools, and more. Learn more about DevKinsta!

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:

An example of mistyped localhost URL.

An example of mistyped localhost URL.

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 .htaccess File

A missing .htaccess file can 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 folder on your computer. Within this folder, there will be another one called htdocs. This folder is likely where you installed WordPress when you initially set up your website. You should find the .htaccess file there:

The location of the .htaccess file.

The location of the .htaccess file.

If you are using a macOS, the file will still be in the htdocs folder. 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 WordPress
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /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 .htaccess file, 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 Deactivate link under the name of the plugin:

Deactivating a WordPress plugin.

Deactivating a WordPress plugin.

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:

The option to delete a plugin after you’ve deactivated it.

The option to delete a plugin after you’ve deactivated it.

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 plugins folder 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 Admin button next to MySQL to open phpMyAdmin.

You can open phpMyAdmin from the XAMPP control panel.

You can open phpMyAdmin from the XAMPP control panel.

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

The default WordPress database tables.

The default WordPress database tables.

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 Drop link to its right:

Removing tables from a WordPress database.

Removing tables from a WordPress database.

Most plugins will make changes to the wp_options table, 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 configuration could be incorrect. More specifically, there may be a conflict with the port that Apache is trying to use.

Looking for high-performance WordPress hosting powered by Google Cloud Platform’s fastest servers? Check out our plans.

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 Netstat button in the XAMPP control panel:

A list of ports in Netstat.

A list of ports in Netstat.

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.conf file. You can find it in C:\xampp\apache\config if you’re using Windows:

The httpd file location in Windows.

The httpd file location in Windows.

If you’re working on macOS, you can find this file in the /etc/apache2 directory. You can locate it using the Go to Folder option 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 80
ServerName localhost:80

Change the Listen port number to 8080 and the ServerName to 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.conf file. Windows users can find this file in xampp\apache\conf\extra.

The httpd-ssl file location in Windows.

The httpd-ssl file location in Windows.

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 404 error. 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 plans today to learn more!


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. Chat with the same team that backs our Fortune 500 clients. Check out our plans