How to resolve 404 errors in wordpress

resolve 404 errors in WordPress

Solution1- Pretty Permalink:

In most case, we can get 404 errors when our permalink structure is set up pretty permalinks and there is not .htaccess file. In this case we can fix this problem by setting up permalinks again.

Go to Admin Dashboard->Settings->permalink-> select Post name and click on save button.

mzml-updatepermalinks

 

Solution2- Mod rewrite:

If you are running WordPress on localhost and 404 error coming up although permalink and .htaccess is ok, then you have to solve this problem. Here I am attached screenshot how to solve this problem in different localhost platform such as Mamp, WAMP, LAMP, XAMPP etc.

mzml-apachemodule

 

mzml-rewrite

 

If you are using a vps server or you have SSH access, you can enable mod-rewrite using command line. Such as for Apache2 on Ubuntu you can enable mod rewrite using this command

a2enmod rewrite

Solution3- Change Apache Configuration:

You can do this method only if you are using vps server and just install linux distro on it or you are using linux server as Vagrant Virtual host on your local machine.

You have to configure apache configure file like this.

Screen Shot 2017-01-21 at 7.18.37 AM