Many applications store files that aren’t part of their code, such as files that users upload. When you deploy, an update from your code can remove these files. A persistent storage folder keeps them in place.
This article explains what persistent storage is, why it’s used, and how to set a persistent storage folder for your application on Cloudways Velocity.
It also explains what’s changing in Git deployments, what to keep in mind when you set the folder, and what to check before your next deployment.
If your application doesn’t store any files outside your code, you don’t need to set one.
What is a persistent storage folder?
A persistent storage folder is a folder on your server whose contents stay in place when you deploy. During a deployment, the rest of your application is updated to match your code, but the persistent storage folder and everything inside it are left as they are.
Why is persistent storage used?
Many applications store files that aren’t part of their code. These can include:
Files users upload
Files the application creates while it runs
Files added directly to the server
For example, if customers upload profile photos to your site, those photos are stored on the server, not in your code.
Because these files aren’t part of your code, a deployment that updates your application from your code can remove them. Persistent storage keeps these files in place through deployments.
What’s changing in Git deployments?
Previously, deployments added new and changed code to your application, but files you had removed from your code were never cleaned up. Those leftover files built up over time and could conflict with your application, causing errors and unexpected behavior.
Starting 22nd October 2026, each deployment makes your application match your code exactly. Files you remove from your code are also removed from the server, so old files no longer build up.
This also means that any file on the server that isn’t part of your code is removed during deployment, unless it’s inside a persistent storage folder.
That includes:
User uploads
Files your application creates while it runs
Files added directly to the server
Without protection, those files will be lost, and your application may stop working correctly. To keep them, set a persistent storage folder.
How to set a persistent storage folder
In the Cloudways Platform, specify the path to the directory you want to retain across deployments. For instance, to safeguard an uploads or storage directory, simply enter /uploads or /storage.
Follow these steps:
Step #1: Open My Applications
Log in to the Cloudways Platform.
In the left menu, click Velocity.
Click My Applications.
Step #2: Open your application
On the Applications page, find the application you want to set the folder for.
Click the name of the application.
Step #3: Open the deployment settings
In the left menu of your application, click Deployment Management.
On the Deployment Manager page, click the Settings tab.
Step #4: Enter the folder path and save
Scroll down to the Persistent Storage section.
In the Path field, enter the path of the folder you want to keep, starting from the top level of your code. For example, to keep an uploads folder at the top level of your code, enter uploads.
Click Save & Redeploy.
Step #5: Check the confirmation message
A message appears confirming that your build configuration was saved.
The message also confirms that a redeploy was triggered for the latest commit.
The folder and everything inside it will be left untouched from your next deployment.
Things to keep in mind
Only one folder path can be set as the persistent storage folder. The setting covers everything inside that folder, including all subfolders, so you can group related folders under one parent. For example, if you keep uploads/folder1 and uploads/folder2, set uploads as your persistent storage folder instead of adding each subfolder. That protects both subfolders and anything else inside uploads.
Files inside a persistent storage folder aren’t updated from your code during deployment. If you change a file inside that folder in your code, the change won’t be copied to the server.
Before your next deployment
Check whether your application stores any files that aren’t part of your code, such as uploads, and make sure those files are inside a folder covered by your persistent storage setting.
A persistent storage folder protects files from future deployments, but it can’t restore files that have already been removed, so back up important files before you deploy.
That’s it! We hope this article was helpful.
