The error message you describe means WP is not even involved. I’ll assume you’ve properly edited the site’s .htaccess file as directed at network thiết lập under the network admin settings. If not, please vì so.

Bạn đang xem: Wordpress 404 error: what it is and 3 ways to fix it

If your server’s file system has an actual folder at localhost/, it would cause the error you describe. You cannot have a network subfolder site that corresponds to lớn an actual subfolder on the server. It’s the lack of any such folder that allows WP lớn gain control when permalink requests are made.

Thread Starter


1 year, 9 months ago

Thanks for your reply.

The .htaccess was edited to accommodate the network setup. A copy of the file’s nội dung has as follows:

“# BEGIN The directives (lines) between “BEGIN” và “END” are# dynamically generated, và should only be modified via filters.# Any changes khổng lồ the directives between these markers will be overwritten.RewriteEngine OnRewriteBase / ^index.php$ –

# showroom a trailing slash lớn /wp-adminRewriteRule ^(<_0-9a-zA-Z->+/)?wp-admin$ $1wp-admin/

RewriteCond %REQUEST_FILENAME !-f RewriteCond %REQUEST_FILENAME !-dRewriteRule ^ – RewriteRule ^(<_0-9a-zA-Z->+/)?(wp-(content|admin|includes).*) $2 RewriteRule ^(<_0-9a-zA-Z->+/)?(.*.php)$ $2 RewriteRule . Index.php

# end”

The server’s file system hasn’t got a thư mục at localhost/wordpres/testsite. This siteurl only appears in the wp_2_options table in phpMyAdmin which was created during the addition of the new site (i.e, testsite) through the network new site addition process.

Is there something else that I might have khổng lồ consider in further resolving my problem?

Thanking you.



.htaccess is correct. This is the one in / folder, correct?

You said the error message mentioned the network URL as “localhost/”. Was there a filename appended to that? There is such a network folder, but it’s not for “The Network”, it’s a path khổng lồ network admin resources. In any case, I don’t think there would normally be a HTTP request for anything in /network/, the files are requested internally by other PHP code. Hence you wouldn’t normally see a vps error messages for those requests, any issues would be logged as a PHP error.

What are you trying lớn access when that error occurs? The subsite’s dashboard at /wp-admin/?

The other thing strange is “localhost/” path should be a valid path on the server, it leads lớn the main site’s PHP resources for the multisite installation. Yet the main site works normally, doesn’t it?

I guess the most remarkable clue is there should not be a HTTP request into “localhost/”, so what would be making such a request? A theme or plugin maybe. In network admin, network disable all themes except twentytwenty. Also network deactivate all plugins. See if the subsite’s admin becomes accessible now.

Thread Starter


Yes, the .htaccess file is located in C:/wamp64/www/ folder.

The error message appears as soon as I try to visit the dashboard of the newly added “testsite” which results in its URL of localhost/ The URL for the network localhost/ works fine, và there is no any file name appended khổng lồ it. The network URL is used to lớn login with my credentials.

As suggested, I network deactivated all themes (except TwentyTwenty) and plugins, and the error still occurs.

The other file that I had to modify during the network setup was “wp-config.php” with the following additional coding:

/* Multisite */define(‘WP_ALLOW_MULTISITE’, true);/* Multisite Network setup */define(‘MULTISITE’, true);define(‘SUBDOMAIN_INSTALL’, false);define(‘DOMAIN_CURRENT_SITE’, ‘localhost’);define(‘PATH_CURRENT_SITE’, ‘/’);define(‘SITE_ID_CURRENT_SITE’, 1);define(‘BLOG_ID_CURRENT_SITE’, 1);

I believe this inclusion khổng lồ the tệp tin is correct.

I also cảnh báo that the versions of all different wampserver components are as follows:Apache 2.4.46PHP 7.4.9MySQL 5.7.31MariaDB 10.3.23

Is there any conflicting version that might be generating the error?Many thanks.



Everything appears khổng lồ be up khổng lồ date, which is sometimes an issue. Wp-config.php is correct.

That error message, is it themed by WP with header, footer, etc., or a plain vanilla vps error? The path really should not physically exist, which gives WP control the request by way of .htaccess rules. WP then figures out the thử nghiệm site subfolder and manages the request internally despite it being an invalid path.

I have a similar site, & no where vày I see a HTTP request to lớn my site’s equivalent of localhost/ Resources in /network/ are used, but not by HTTP request, it’s by internal file system access through PHP require or include statements.

After you try khổng lồ login and get the error, kiểm tra your error.log file to see if any further clues can be found there, logged as a result of your log in attempt.

Does your installation have a wp-content/mu-plugins/ folder? If so, try renaming that as part of the no plugins và twentytwenty theme test.

Thread Starter


I bởi appreciate your perseverance & ongoing tư vấn in trying lớn resolve my problem.

I believe the error message is generated by the server in trying to visit the newly network added “testsite” site.

When you try lớn access the “testsite” via the network cài đặt results in the siteurl of http://localhost/ without the /network/ addition khổng lồ the address you mentioned. The http of localhost/ is the network siteurl.

Xem thêm: Configuration Tips To Overcome Hurdles With Rdp Windows 7 ? How To Setup Remote Access Windows 7

My installation does not have a “wp-content/mu-plugins” folder, the only folder is the “plugins” one.

I have checked the error.log tệp tin (wamp64/logs/access/) as you suggested and a common line that I appears in the file every time that I have attempted to log in và visit the testsite is “::1 – – <10/Sep/2020:13:56:46 +1000> “GET / HTTP/1.1″ 404 280”. Is this a clue in resolving the issue?

I have to lưu ý that this problem I am experiencing is very peculiar as I had a similar multisite (network) mix up successfully installed recently prior lớn my computer nâng cấp without any errors. That installation was obviously done with earlier versions of wampserver and



Yes it is very peculiar! I think the error message you quoted is from the Apache access log. There ought to be a separate error log. It’s not always “error.log”, as its name and location can be redefined in Apache configuration.

It seems the .htaccess rule that sends requests lớn WP when a path does not physically exist is not being honored. On the main network site, bởi you have “pretty” permalinks enabled & working correctly? If not, Apache could be configured lớn not honor any .htaccess rules. But if they are working, then I’m at a loss. That access log 404 should not be logged & WP should be sent the request.

This condition in .htaccess is the one responsible, which does not seem lớn be applied: RewriteCond %REQUEST_FILENAME !-d

The error message I quoted earlier was from the C:/wamp64/logs/access/ file. I have also checked the “apache_error” tệp tin in the same folder (C:/wamp64/logs/) but I can’t see anything suspicious there.

The permalinks for the main network site are enabled và working fine. It is obvious that I can’t kiểm tra the permalinks for the problem “testsite” as the site can not be visited.

I have also double-checked the siteurl’s for all sites created, i.e, the main network site and testsite, in both loalhost/ và phpMyAdmin & appear khổng lồ be correct & as per initial network setup.

I am considering khổng lồ uninstall & re-install both wampserver và in an attempt lớn see if the error message goes away with a new & fresh setup.

I’m out of ideas for addressing the current installation, so re-installation is worth a try. Especially since you have the same thiết đặt elsewhere & have had no problems.

If you continue to lớn have trouble after re-installation, I recommend seeking help through WAMP support since WP is not even involved. The hệ thống is handling the request itself instead of passing it on lớn WP as the .htaccess rewrite rules tell it to.

That sounds lượt thích a brush-off, but it’s not, I’ll continue lớn offer assistance the best I can, but I’m a WP expert, I’m a bit weak with server issues.

Can I throw a couple more challenges to you prior lớn proceeding with the re-installation?

1) do you think that it might be something wrong with the wp-admin folder (wamp64/www/ as this is one of the steps going through to lớn login to sites created?2) vị you also think that the following files might have to lớn be somehow modified with additional coding to lớn accommodate my network setup? * C:/wamp64/www/ * C:/wamp64/www/

Finally, what is your opinion in having to modify also these files: * C:/wamp64/bin/apache/apache2.4.46/conf/extra/httpd-vhosts.conf/, và * C:/windows/system32/drivers/etc/hosts/

Thanks again for your assistance.

Something wrong with the folder? In what way? All it does is have certain permissions. Improper permissions should result in 403 Forbidden, not a 404 Not Found.

Well, that’s from the Apache standpoint. You also have the Windows aspect to contend with. If that’s wrong, I’m not sure what Apache would do, maybe it would 404. In any case it wouldn’t hurt to lớn double check. To kiểm tra Apache/Linux permissions, I think you need to use the FileZilla server và do so via FTP. Permissions would typically be 755.

To kiểm tra Win permissions, I believe the user who launched WAMP should have full permissions. Better yet be the owner.

There shouldn’t ever be a reason khổng lồ edit vi xử lý core files. Doing so is vehemently discouraged by all WP experts I’ve ever run across. Any odd server issues that need to be addressed should be managed through a plugin of some sort. Some hosts that offer managed WP plans who need khổng lồ change some aspect of WP will modify their installation by way of a must-use plugin.

OTOH, you can edit virtual hosts (vhosts) files as needed, that’s what they are there for. You can add additional server blocks to have Apache respond to lớn other tên miền names and direct requests to lớn subfolders. To lớn use other domain names you need khổng lồ also make a hosts file entry. Restart Apache after editing virtual hosts, restart your computer after editing hosts.

I like to use the hosts tệp tin to assign a real domain name khổng lồ so I can work on a clone of the site locally without needing khổng lồ alter any domain names in the DB. This does mean I cannot access the production site, but it’s not much of a hindrance since I have a clone of it locally.

You can use arbitrary domain names for the convenience of directly accessing a subfolder installation as though it were the domain’s public root. You need both a hosts file entry and a virtual hosts entry, as well as altering the WP site and home URLs. You could for example use the domain “wp.test” to lớn go directly lớn localhost/ This is essentially how shared hosting works.

Wow! finally someone who seems khổng lồ know what they are on about and is homing in on the possible problem. I’m a novice with localhost servers & multisites. My brand new installation with Wampserver64 works beautifully with network subdirectory (?) & subsites. The same does NOT apply khổng lồ my Bitnami Multisite This installs & configures ok but only works with the single (base?) site. Once you try to add subsites I get the same 404 errors. Is there a simple summary for novices on the ACTUAL code updates to lớn be put into htacces và wp=conf etc. This is all without any changes and on windows 10 pro. Và how vị we kiểm tra the Apache hệ thống for the correct phối up. I hasten to địa chỉ I’m an IT consultants of more than 30 years experience in the Pharmaceautical industries & if we failed to thử nghiệm our software properly we would get the sack immediately (let alone risk sanctions from the FDA).Kind Regards . Mauro.Quote:It seems the .htaccess rule that sends requests khổng lồ WP when a path does not physically exist is not being honored. On the main network site, vị you have “pretty” permalinks enabled và working correctly? If not, Apache could be configured to lớn not honor any .htaccess rules. But if they are working, then I’m at a loss. That access log 404 should not be logged & WP should be sent the request.This condition in .htaccess is the one responsible, which does not seem to lớn be applied: RewriteCond %REQUEST_FILENAME !-d