If you are WordPress user, chances are, you might have noticed several files of small size (typically under 1MB) ending with .tmp extension, like wordpress.tmp, theme-editor.tmp, wordpress3.tmp etc., in your wp-content folder. Wondering what they are, why they are created and whether you can remove them?

What are .tmp files
In general computing parlance, tmp files are created if a program cannot allocate enough memory for its tasks, as backup or as part of a cleanup (but the program is then unable to clean the .tmp files).
In the context of WordPress, .tmp files are created during plugin updates that are performed from within WordPress’ backend admin panel (wp-admin). If the plugin upgrade fails for some reason, or the user terminates it voluntarily, the .tmp files may not be deleted by WordPress. Notice that the .tmp files in above screenshot have names of WordPress plugins. Temporary files may also be created during WordPress updates.
ADVERTISEMENTCan tmp files be deleted safely?
The .tmp files can be deleted safely under normal circumstances – since they are usually the forgotten residue of some incomplete WordPress actions. However, we do not guarantee this – it is always safer to do a local backup of the files, just in case. In my case, deleting the .tmp files has had no side effects, so I would assume the same for any WordPress install.