0

My problem is in my WordPress site only default permalinks are working. When I change permalinks all pages become not found (404). The home page and the shop page is the only working with post name.

Before this problem, I have one more question. that was my site was hacked or may be due to plugin it has some unnecessary files which redirect to some dating site. But I have checked them and delete using WordFence Wordpress plugin. The site is clean now!

This is my .htaccess file

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

What I did so far?

  • Change permalinks type and save twist. (nothing work even in a private window)
  • Change rewrite mode in the database file (clear that field empty and change permalink type. not work)

*Which plugin I have used?

  • Really Simple SSL

  • Wordfence Security (pro)

Other plugin related to the theme such as slider revolution, WooCommerce, Contact Form 7 etc. I think they are not that critical to this problem.

I have checked these posts:

only default permalinks working wordpress others become 404 error

After changing domain name of wordpress site only default permalinks working wordpress others returns 404 error

Non of answer work for me. That why I'm post this as a new question here. Also i have post this to https://wordpress.stackexchange.com/ couldn't find an answer yet.

Thank you

Sahan Pasindu Nirmal
  • 433
  • 4
  • 13
  • 36
  • Verify that the 'rewrite' module is loaded. Create a phpinfo() page and make sure mod_rewrite is enabled. – Karthick Apr 04 '20 at 20:25
  • Thank you for your suggestion. What you mean by Create a phpinfo() page? – Sahan Pasindu Nirmal Apr 06 '20 at 02:19
  • I meant, create any simple PHP page in your root folder & try to embed inside the file and run it. You will get compiled information about your PHP environment and search for the module call mod_rewrite. The module should be enabled to run permalinks in WordPress. [More Details](https://stackoverflow.com/questions/7337724/how-to-check-whether-mod-rewrite-is-enable-on-server/37693775) – Karthick Apr 06 '20 at 11:03

0 Answers0