Changing permalink settings causes 404

There are several possibilities: you may need to enable mod_rewrite on the Ubuntu server or check/fix permissions to allow WordPress to write to the .htaccess file. Best thing to do is read http://codex.wordpress.org/Using_Permalinks and work through suggestions.

New install of wordpress, my url goes to index of/

You might need to create .htaccess file inside your site’s home directory(like : /public_html) Here is the sample : # 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] </IfModule> # END WordPress And also check your files permission. See Details : … Read more

If $var is empty, return 404.

I have run into the same issue that using $wp_query->set_404(); would properly adjust the global object but not return the 404 template. So in the plugin I was writing I used the tried and tested method: add_filter( ‘template_include’, ‘wp_139917_force_404’ ); function wp_139917_force_404(){ global $wp_query; $wp_query->set_404(); status_header(404); include get_404_template(); exit; } ~ modified from source: https://github.com/codearachnid/woocommerce-product-permalink/blob/master/inc/product-permalinks.php#L56 … Read more

WordPress Permalinks 404 bug with “next” button

I fixed the problem by editing my .htaccess file. I replaced it with the following. # BEGIN WordPress <IfModule mod_rewrite.c> ErrorDocument 404 /index.php?error=404 RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress

404 Admin Error

I found the solution. I had to open up phpMyAdmin open up the database then open up wp_options. From there I had to change the siteurl and add /wp to the end and it works again.