if you have destroy, damage or delete .htaccess file accidently and looking for a quick fix then you have come to right place. just follow below provided steps to recreate .htaccess file for your wordpress site.
Note : check your permalinks structure from wordpress dashboard after making these changes and make sure the permalink structure is same as before. (if not ? simply change it to the way it was) 🙂
Method to Recreate Damaged Or Deleted .htaccess file for wordpress :
Step # 1 : Simply copy below provided code to a notepad.
# 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
Step # 2 : Now you just have to save this notepad as .htaccess > name this notepad as .htaccess select all files and select destination folder “for example desktop” to save this .htaccess.
Step # 3 : Finally upload this .htaccess “file” to your wordpress server public_html folder. That’s it 🙂
Leave a Reply