Permissions setting for WordPress’ .htaccess

.htaccess permissions

644 > 604 – The bit allowing the group owner of the .htaccess file read permission was removed. 644 is normally required and recommended for .htaccess files.
Follow the instructions below to setup you .htaccess file correctly:

  1. First you need to create the .htaccess file in your root folder.
    To do so grant 777 permission to your root folder by entering the following command in your google ssh window:sudo chmod 777 /var/www/html
  2. Once permissions have been granted, open Filezilla, right clic in the root folder, select “create a new file” and name it “.htaccess”.  Then, edit the file and copy past the following piece of code to set the mod_rewrite rules:RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
  3. Finally, revert back your root folder permissions to original that is to say 755 by entering the following command:sudo chmod 755 /var/www/html