1

I can add new pages and preview them, but once I upload them I get a 404 "Not found" error. I thought it's a problem with my permalinks, so I followed some tutorials to fix this like http://www.felfelworld.com/2013/02/12/page-not-found-permalink-wordpress/. Had the same settings, but I couldn't find the httpd.conf file. I tried testing the configuration or finding it with apachectl configtest and find httpd.conf. Here's my .htaccess file:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# END WordPress

It's in the root folder of my webiste with the permissions 644. This is what's happening when uploading a new page (preview > update > error):

Preview


404 error

If I go back to the editor and click preview again I get the same error.

Edit: I was looking for other tutorials and figured the files would have the wrong permissions. So I did a bit of testing and changed the permissions of .htaccess, went to Permalinks and saw that it's not writable anymore. I changed the permissions again, switched from "Post name" to "Plain" (default) and it works. But leaving it like this basically doesn't allow me to use Permalinks anymore.

  • So have you tried switching to a default theme and disabling all plugins? – Sally CJ May 1 at 11:13
  • The theme I am using is a default theme. I have also tried deactivating all plugins, not working. When disabling the plugins I can't even preview the page anymore – Rin May 1 at 11:49
  • I was thinking that the Apache's rewrite module may be disabled.. but I'm guessing you already checked that and confirmed it's enabled? Does the error show up when viewing all pages (single posts, category archives, etc.) that have permalinks, or only specific pages? Have you checked the error logs - is there anything that might be relevant to the error 404? – Sally CJ May 1 at 12:29
  • Try also clearing your browser's cache - and if enabled, your site's cache. – Sally CJ May 1 at 12:36
  • The rewrite module is enabled. The error shows up for all kinds of pages. I couldn't check the error log because it was disabled on the wp_config.php file and cleaned the cache. I changed the permissions to my files and .htaccess, then went to permalinks and it said that the file is not writable. I gave the file other permissions, then went back to permalinks and changed them from post name to plain. With that I can preview and upload every page but it means that it'll have to stay this way in order to work, which is not what I had in mind. I'd basically mean I can't use the permalinks :/ – Rin May 1 at 12:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.