If you have been using WordPress, it is common that you come across the 404 URL not found error on your website. This occurs mainly if the site is not maintained properly. But there are times when your website is under maintenance and your visitors will be automatically directed to a 404 error page.

 URL not found error on WordPress

Stepwise guide to solving the URL not found error on WordPress

1: Save Permalinks from WordPress Admin Dashboard

Go to settings>Permalinks and save settings. This will automatically write the htaccess file with the correct configuration.

2: Add the following lines on the virtual host :

If you haven’t included the Allowoveride rule on the apache virtual host.

Step 1:  Go to /etc/apache2/

Step 2: Edit or open httpd.conf file with your favorite text editor.

<Directory />

        Options -Indexes +FollowSymLinks

        AllowOverride All

</Directory>

You can also initially configure your domain virtual host configuration on sites-enabled /etc/apache2/sites-available

<VirtualHost *:80>

    ServerName domain1.com

    ServerAlias www.domain1.com

    ServerAdmin webmaster@domain1.com

    DocumentRoot /var/www/domain1.com/public_html


    <Directory /var/www/domain1.com/public_html>

        Options -Indexes +FollowSymLinks

        AllowOverride All

    </Directory>


    ErrorLog ${APACHE_LOG_DIR}/domain1.com-error.log

    CustomLog ${APACHE_LOG_DIR}/domain1.com-access.log combined

</VirtualHost>

We hope you find this guide helpful and that you were able to solve your URL not found error in WordPress. If you find any technical issues hosting your website, you can directly contact us at Cloudlaya. We will be happy to assist you.