I have migrated WordPress website to new server (Ubuntu) which is working fine.
But Permalinks settings are not working. All other pages returning me 404 error.
I already enabled mod_rewrite
When I use custom structure and type /%postname% it shows Permalink structure updated. and while visiting the page it returns be 404 error.
I am using /var/www/html/wordpress Installation directory/ as a folder and I have change /etc/apache2/sites-available/000-defaul-config to
DocumentRoot /var/www/html/wordpress Installation directory
and below in 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]
</IfModule>
# END WordPress
Any idea what is wrong?
sudo chown www-data:www-data -R wordpress
andsudo chmod -R 777 wordpress
– Tamil Selvan C.htaccess
file once and then go to permalink and submit once again – Tamil Selvan C