Home > CMS Tutorial > WordPress > body text

Why does wordpress get a 404 error?

Release: 2019-07-19 16:15:25
Original
4451 people have browsed it

Why does wordpress get a 404 error?

After setting a custom fixed link in the WordPress backend, the front page cannot be displayed, prompting a 404 error page, but the original default dynamic path can still be opened. Why is this?

Analysis:

Generally when we use open source programs, such as WORDPRESS, we will first debug locally and upload some data. As mentioned in the title, when debugging on this site It has happened before. I checked some information and came to the conclusion:

The biggest possibility is that there is a problem with the configuration of apache (PHP server). After setting a custom fixed link in the background, it is equivalent to customizing the pseudo-static rules of the site. Then during the debugging process, your server environment must support pseudo-static before you can open the static path. Generally, you can If you configure the fixed path in the background, then your server environment will generally have no problems. The dynamic path can also be turned on, which means that there will be no problems with database connection and permissions. The problem usually lies in that you have not turned on Apache. Support pseudo-static function, how to implement it? Prerequisite: You are using the Apache server. First find the path where Apache is installed. There is a file called
"httpd.conf" in the "conf folder" in its root directory. Open it with Notepad. Press the "ctrl F" key to pop up the search window, enter:

"#LoadModule rewrite_modulemodules/mod_rewrite.so"

If you can find it, delete the # in front, this # sign indicates a comment , that is, it is not enabled. After we remove it, we enable the

"mod_rewrite" module. If it cannot be found, try to enter again:

"LoadModule rewrite_modulemodules/mod_rewrite.so"

See if you can find it. If you can find it, it means that this module has been turned on. Continue to search for "Options FollowSymLinks AllowOverride None Order deny,allow Deny from all

" and change "AllowOverride None" to "AllowOverride all", which is To be on the safe side,
You can also search for "AllowOverride None" again. It may appear in multiple places, replace them all with "AllowOverride all", and then save the file.
Next, restart the apache server, go to the background to save the "fixed link", and reopen the page to see if it can be opened.
If you are not an Apache server, but use IIS for debugging, you have to install an "ISAPI_Rewrite3_0069_Lite.msi" filter, and then set PHP as a priority in the site settings.

For more wordpress related technical articles, please visit the

wordpress tutorial column to learn!

The above is the detailed content of Why does wordpress get a 404 error?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template