Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Can you please check if the following line exists in your wp-config.php file? It needs to be set to false so Rank Math can modify your .htaccess and robots.txt files:
define (‘DISALLOW_FILE_EDIT’, true);
Here is a guide for your reference:
https://rankmath.com/kb/cant-edit-robots-txt/#robots-txt-file-is-not-writeable
Let us know how that goes.
Thank you.
can you tell me how to add?
Hello,
You don’t need to add this. You can just check if this line exists in your wp-config.php file. If this line exists then make sure to set it false. You can follow this URL to learn how to locate your wp-config.php file: https://wphive.com/tutorials/how-to-access-wp-config-php-file-in-wordpress/
Let us know how it goes.
Thank you.
No this line doesnt exists what to do now?
Hello,
In this case you can add the following line on your wp-config.php file:
define (‘DISALLOW_FILE_EDIT’, false);
However, this line may be potentially risk for your website as this will allow modifying the files of your website. So, if you want you can set it true again once you edit the robots.txt and htaccess files.
Hope that helps. Please don’t hesitate to let us know if you have any other questions.
Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.