One of the most annoying things a WordPress website owner could witness is missing a temporary folder error. This error mainly occurs due to erroneous changes in the PHP files. As WordPress needs to locate these PHP files to make certain changes in the themes and plugins, it makes it impossible for the owner to modify their website.
Without fixing this error, it will be unmanageable for every WordPress website owner to upload any media or to update any of their theme or plugin. Moreover, you won’t be able to update the WordPress files.
Another reason for popping up this error is that sometimes the administrator unintentionally deletes the temporary folder in which the WordPress stores its files before uploading them to the website. It makes it impossible for the WordPress database to store the files, thus being the reason for this error.
If you believe that you have made the mistake of deleting the temporary folder or there is some other problem your hosting environment, then here we present you the best method to fix this error and keep on updating your website with new stuff.
Before working on the WordPress database files, the first thing you should do is create a proper backup of your WordPress website. You need to login to your server to create a backup of your site. Login to the web host and open its cPanel and navigate to its directory.
You can’t copy the WordPress files without compressing them. Right-click on the WordPress directory and select the compressed folder. The program will then ask you to select the output format for the compression from ZIP, ISO, GZIP or other compression formats. After deciding, click on the Compress Files button, and the backup process will start. It may take up to ten minutes, depending on the website files.
Once the process is complete, right click on the compressed file and select Download Now. Select the location of the download, and your backup process is now completed.
In order to fix this error, you need to access your WordPress database files. You can access those files with the help of an FTP client or through a file manager.
However, the availability of the file manager depends on your web hosting provider. Login to your FTP client and open your WordPress directory. Once the WordPress directory is opened, find the file named as wp_config.php. Afterwards, right click on that file and click on Download and the file will be downloaded to your system in a fraction of seconds.
Once the wp_config.php file is downloaded on your system, you need to open that file using any of the text editors. Paste the following code right after the line stating ‘happy blogging’ and save the changes on the file.
define(‘WP_TEMP_DIR’, dirname(__FILE__) . ‘/wp-content/temp/’);
You have saved changes in your local system, but to reflect those changes to your website, you need to upload that file back to your server. Open the WordPress directory once again and replace this file with the previous one and the changes will now reflect on your website.
Open the folder named as wp-content which will also be found in the WordPress FTP directory and create a new folder and name it as ‘temp’. This temp folder will store all the temporary files which WordPress makes before uploading.
There is one more method to fix this error which is elaborated below:
Just like the previous process, you need to login to your FTP directory using your cPanel. Open the WordPress directory and search for the folder named as public_html. After locating that folder, open it and create a file named as php.ini.
Open that file using any text editor, paste the following code and save the file
Like the earlier method, you need to upload that file back to your website server and save all the changes made.
Once the changes are saved on your website’s server, you need to create a temp folder in the public_html folder so that the WordPress could save temp files.
Despite following the methods mentioned above, if you still face this error, then there is something wrong with your file and folder permissions. You need to follow these steps to correct those settings:
Login to your WordPress directory using the FTP client or file manager provided by your hosting provider and open the WordPress directory. Now, select all the folders present in the directory and press the right click button and select File Permissions.
Once you click on the File Permissions button, a popup stating will open where you need to make certain changes to make it work. In the Owner Permissions, select all the options naming read, write and execute. In the Group Permissions, check read and execute and leave the write option as unchecked. Afterwards, in the Public Permissions, enable read and execute and leave the write option disabled.
Enter 755 in the numeric value and check recurse into subdirectories after which you need to select Apply To Directories Only and click on Okay. The FTP will save all the changes made to your folder permissions.
Go back and select all the files in the WordPress directory and follow the same process. Once the file permissions popup appears, in the Owner Permissions, enable read and write and disable execute. Afterwards, in the Group and Public Permissions, enable the read option and disable the other two. Now enter 644 as a numeric value and check recurse into subdirectories. Select Apply To Files Only and press the Ok button. The FTP will now save all the changes, and your error will now be fixed.
These methods will most probably fix missing a temporary folder error, but if you still face this error, then you should contact your web hosting provider as there is a possibility that the problem exists from their side.