After transferring my website from localhost on my host server and changing the theme to a newer one.
Performing any action including saving settings, installing plugin, saving plugins settings page and basically any saving action which is related to wordpress api will redirect me to home page.
I have tried to disable all plugins and even change to default theme but the issue still persists.
I also, did some research and a .htaccess code was suggested to be added on and it didn't work either. the code is as follow:
<IfModule mod_security.c> SecFilterEngine Off SecFilterScanPOST Off </IfModule>
I performed security scan using cpanel anti virus as well as wordfence scanner and still no luck.
My final though was maybe a wordpress core file was corrupted therefore, all files in
wp-includes and also root files were replaced.
I am currently using PHP 7.2.
Any suggestion? It is driving me crazy