> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mainwp.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Enable tmpfile() PHP function on Cloudways

> Enable the tmpfile() PHP function on Cloudways to allow plugin and theme uploads through MainWP Dashboard.

Cloudways disables certain PHP functions by default for security. The `tmpfile()` function is one of these, and MainWP requires it for uploading plugins and themes via ZIP file.

## What You'll Learn

* How to identify if tmpfile() is disabled
* How to enable tmpfile() in Cloudways
* How to verify the change worked

## Prerequisites

* Cloudways account with access to Application Settings
* MainWP Dashboard installed on a Cloudways application

***

## When You Need This

Enable `tmpfile()` if you encounter:

* Plugin or theme uploads failing from your MainWP Dashboard
* "tmpfile() has been disabled" error messages
* ZIP file installations timing out or producing errors
* The Favorites extension unable to deploy plugins

![Error message showing tmpfile function is disabled](https://mintcdn.com/mainwp/BNdtsT0iNiekSNfE/images/miscellaneous/d36645a78ccf.png?fit=max\&auto=format\&n=BNdtsT0iNiekSNfE\&q=85\&s=ea7274d7ed5eeb205e8689299a54d17f)

***

## Enable tmpfile() on Cloudways

**1. Log in to Cloudways**

Access the Cloudways Platform at platform.cloudways.com and navigate to your servers list.

**2. Select your application**

Click on the server, then select the application where your MainWP Dashboard is installed.

**3. Open Application Settings**

From the left sidebar, click **Application Settings**.

![Open Application Settings from the left sidebar](https://mintcdn.com/mainwp/OKpZbeo5_cAajLyl/images/miscellaneous/advanced-miscellaneous-512bd0.png?fit=max\&auto=format\&n=OKpZbeo5_cAajLyl\&q=85\&s=1a774c8c757969fc26cbc084d4e7452f)

**4. Navigate to PHP FPM Settings**

Select the **PHP FPM SETTINGS** tab at the top of the settings panel.

**5. Remove tmpfile from disabled functions**

Locate the **DISABLED FUNCTIONS** field. Find `tmpfile` in the list and delete it.

![Animation showing how to remove tmpfile from disabled PHP functions list](https://mintcdn.com/mainwp/OKpZbeo5_cAajLyl/images/miscellaneous/advanced-miscellaneous-05eef0.gif?s=a88dac8467d656181f179edaa9bcab8e)

**6. Save changes**

Click **SAVE CHANGES**. Cloudways applies the new PHP configuration.

***

## Verify the Change

After saving changes, confirm `tmpfile()` is enabled:

**1. Check Server Information**

In your MainWP Dashboard, go to **MainWP > Info > Server**.

**2. Review disabled functions**

Look for `tmpfile` in the PHP functions list. It should no longer appear under disabled functions.

**3. Test an upload**

Optionally, test by uploading a small plugin ZIP file through **Sites > Plugins > Install Plugins > Upload .zip file** (`/wp-admin/admin.php?page=PluginsInstall`).

***

## If Changes Don't Take Effect

If `tmpfile()` still appears disabled after saving:

1. Clear any server-side caching in Cloudways
2. Wait a few minutes for the PHP-FPM process to restart
3. Clear your browser cache and check Server Information again
4. Contact Cloudways support if the function remains disabled

***

## Self-Check Checklist

* [ ] Logged into Cloudways Platform
* [ ] Located correct application (MainWP Dashboard)
* [ ] Removed tmpfile from DISABLED FUNCTIONS list
* [ ] Saved changes
* [ ] Verified tmpfile no longer appears as disabled in MainWP
* [ ] Tested plugin/theme upload

***

## Related Resources

* [Required PHP Functions](https://docs.mainwp.com/advanced/miscellaneous/required-php-functions-for-mainwp.md) - Complete list of required functions
* [Hosting Compatibility](https://docs.mainwp.com/advanced/miscellaneous/hosting-compatibility.md) - General hosting requirements


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.