Suddenly found WordPress wp-content directory generated a lot of temp-write-test * 0 byte file, although 0 bytes do not take up hard disk capacity, but the number is too large, sometimes up to hundreds of thousands of files, very much affecting the operation of the site, this article will describe how to prohibit the generation of such files.
![Image [1]-WordPress directory to generate temp-write-test* and other 0 byte file solution - Photon Fluctuation Network | Professional WordPress repair services, worldwide, rapid response](https://www.361sale.com/wp-content/uploads/2024/04/image-772.png)
This file is usually in the /wp-content/ directory, or the /wp-content/plugins/ directory, or the /wp-content/themes/ directory, as shown here:
![Image [2]-WordPress directory to generate temp-write-test* and other 0-byte file solution - Photon Flux | Professional WordPress repair services, worldwide, rapid response](https://www.361sale.com/wp-content/uploads/2024/04/2024-04-19_08-40-51.png)
Let's talk about the solution:
Find and open wp-config.php in the root directory of the website:.
![Image [3]-WordPress directory to generate temp-write-test* and other 0 byte file solution - Photon Fluctuation Network | Professional WordPress repair services, worldwide, fast response](https://www.361sale.com/wp-content/uploads/2024/04/2024-04-19_08-43-53.png)
Open it and find the following code:
define( 'WP_DEBUG', false );
Add the following code below it:
define('FS_METHOD', 'direct').
It looks like this when the additions are complete:
![Image [4]-WordPress directory to generate temp-write-test* and other 0 byte file solution - Photon Fluctuation Network | Professional WordPress repair services, worldwide, fast response](https://www.361sale.com/wp-content/uploads/2024/04/2024-04-19_08-44-51.png)
This completes the setup to disable the generation of temp-write-test files.
Next, we'll just delete the temp-write-test file that we've generated before in the file manager of our website.
![Image [5]-WordPress directory to generate temp-write-test* and other 0 byte file solution - Photon Fluctuation Network | Professional WordPress repair services, worldwide, fast response](https://www.361sale.com/wp-content/uploads/2024/04/2024-04-19_08-52-42.png)
Link to this article:https://www.361sale.com/en/8351
The article is copyrighted and must be reproduced with attribution.
No comments