Hello,
We apologize for the issue you are facing with Rank Math generating numerous temp-write-test files and the associated PHP error. This behavior can occur due to strict file permissions or conflicts with other plugins or themes.
To address this issue, you can try the following steps:
-
Check File Permissions: Ensure that the permissions for your wp-content
folder and its subdirectories are set correctly. The recommended permissions are:
- Directories:
755
or 750
- Files:
644
or 640
- For the
wp-config.php
file, use 400
or 440
.
You can change these permissions using an FTP client or through your hosting control panel. Here’s a visual guide on how to change directory permissions:

-
Disable Temporary File Creation: If the issue persists, you may want to add a filter to your theme’s functions.php
file to disable temporary file creation by Rank Math. You can add the following code:
add_filter( 'rank_math/temp_file_enabled', '__return_false' );
This will prevent Rank Math from creating temporary files.
-
Check for Plugin Conflicts: Sometimes, conflicts with other plugins can cause unexpected behavior. Try deactivating other plugins one by one to see if the issue resolves.
-
Contact Hosting Provider: If you continue to experience issues, it may be worth reaching out to your hosting provider to ensure there are no server-level restrictions causing this problem.
If you need further assistance, please reply to this ticket with your site URL so we can provide more specific guidance. Thank you for raising this concern!
Sources:
How To Fix Blocked Due to Access Forbidden (403) Error in Google Search Console » Rank Math
Thank you for the prompt reply. I have added add_filter( ‘rank_math/temp_file_enabled’, ‘__return_false’ ); to the functions.php. But rankmath is still trying to open the temp-write-test files
Hello,
Thank you for contacting us, and sorry for any inconvenience that might have been caused due to that.
Can you please share a screenshot of the error so that we can check the issue further for you?
You can use any image-sharing tool like https://imgur.com/upload to share the screenshot with us.
Looking forward to helping 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.