The Blog

The requested URL was not found on this server – WordPress


Change the ‘AllowOverride None‘ to ‘AllowOverride All‘ in /etc/apache2/apache2.conf 

On the root of the WordPress directory, create the ‘.htaccess’ file with 775 permission

# BEGIN WordPress
# As diretrizes (linhas) entre "BEGIN WordPress" e "END WordPress" são
# geradas dinamicamente e só devem ser modificadas através de filtros do WordPress.
# Quaisquer alterações nas diretivas entre esses marcadores serão sobrescritas.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

Setting the file owner and access permission for all files

sudo chown -R www-data:www-data wp-admin/
sudo chown -R www-data:www-data wp-includes/
sudo chown -R www-data:www-data wp-content/
sudo chown -R www-data:www-data *.php
sudo chown -R www-data:www-data *.html
sudo chown -R www-data:www-data *.txt
sudo chown -R www-data:www-data .htaccess

sudo find . -type d -exec chmod 775 {} \;
sudo find . -type f -exec chmod 664 {} \;

sudo chmod 775 .htaccess

Alternate and save between ‘Plain’ and ‘Post name’ options

Check if your page is working again. Don’t forget to share with us your solution. I hope I could help you with this. See ya!

Leave a comment