Loading...


Related Products


Date Published: September 29, 2023

How to delete all site files hosted in Acquia

 

Warning:

Remember, once you proceed with deleting all the files, there is no process of reverting back. 
 

Issue:

I want to remove a website data and start over from scratch which is hosted in Acquia.


Resolution:

Cloud Platform Enterprise uses shared file systems to ensure that data your code writes to a /files directory is accessible on all web nodes running your application’s code. Files that are writeable by your application, this is not applicable for the git repository files.
 

When you import or create your Drupal codebase, Cloud Platform creates symbolic links to your public file directory. Every Drupal multisite website in your account has its own /files directory.

  • [docroot]/files links to /mnt/files/[site].[env]/files
  • [docroot]/sites/default/files links to /mnt/files/[site].[env]/sites/default/files
  • [docroot]/sites/example.com/files links to /mnt/files/[site].[env]/sites/example.com/files

To ensure its privacy, the /files-private directory is not symbolically linked to your application’s [docroot]. For private file handling, you can either use the absolute path to [docroot] or a relative path under ../acquia-files. For more information, see  Setting the private file directory on Cloud Platform.

The above mentioned are the file locations where you will need to ssh into the required environment and change the directory to delete the files.


Example:

Here is an example demonstrating how to delete the files:

site.env@staging-xxxx:/var/www/html/site.env/docroot$ cd ..

site.env@staging-xxxx:/var/www/html/site.env$ cd acquia-files

site.env@staging-xxxx:/var/www/html/site.env/acquia-files$ cd backups: rm -rf *: cd..

 

This is the list of folders under /acquia-files that you want to delete.

./backups

./php_sessions

./files

./sites/example1/files

./sites/example1/files-private

./sites/example1/example-files

./ssl

./logs

./livedev


Note: Some of these folders might not exist for you. The site's folders may be more than what is documented here, the names can be different.

To reset your code repository follow the instructions:
 https://docs.acquia.com/cloud-platform/manage/reset/

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation