Delete uploaded documents and images (WCMS 2)

How to delete uploaded documents and images

 

Site managers can delete documents and images uploaded on their website. When content maintainers remove a document or an image on a web page, it is still stored on the website and can be inserted back using "File browser" and "Reference existing" upload methods.

Locate unused files

  1. From the Administration bar, select My Workbench.

  2. Select the File list tab.

  3. Select the On Node heading to sort the files. If there is no number in that column, then that file (document or image) is not published.


The following steps will permanently delete a document or image from the website.

  1. From the Administration bar, select My Workbench.

  2. Click on File list tab.

  3. If you are removing a document, note the URL of the document for creating a redirect. If you are removing an image you can skip this step.

  4. In the Actions column, select the Delete link for the file or image to be deleted.

  5. On the confirmation page, click the Delete button.

  6. The deleted file or image will no longer display in your File list, or be found on your website.

Please note: For documents - linked text will still display on the website and must be removed. If clicked, the user will be directed to a '404 Page not found' web page.


Best Practice - add a redirect for a document

When a document is deleted people going to that URL will get a “Page not found” unless you redirect that URL to somewhere else.

  • You can’t redirect from a document that has not been deleted because the browser hits the file before it hits the redirect.

  • You should redirect from a document that has been deleted (see below for an example) so that if a user had that URL bookmarked or it is still being indexed by a search engine users will be redirected to the new document.

Example of redirecting a pdf document:

To redirect https://uwaterloo.ca/information-systems-technology/sites/ca.information-systems-technology/files/uploads/files/license.pdf

To https://uwaterloo.ca/information-systems-technology/sites/ca.information-systems-technology/files/uploads/files/license-new.pdf

  • Record the path of the pdf that is being replaced (sites/ca.information-systems-technology/files/uploads/files/license.pdf).

  • Delete the pdf that is being replaced (license.pdf)

  • Add the new pdf to the appropriate page (license-new.pdf)

  • Go to Dashboard > Redirects > Add redirect

  • In the first field enter the path of the deleted pdf (sites/ca.information-systems-technology/files/uploads/files/license.pdf).

  • In the second field enter the path of the new pdf (sites/ca.information-systems-technology/files/uploads/files/license-new.pdf).