Legacy Knowledge Base
Published Jul. 2, 2025

How Can I Reset My Liferay PaaS Environment to its Original State?

Written By

Justin Bowman

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • Every so often, a situation may arise during development or testing where you need to bring your Liferay PaaS environment to a "clean" state and start over. Perhaps a deployment has caused data corruption or some other unintentional change causes an issue in the environment. This article covers steps one can use to "reset" their environment and bring it to a "clean" state.

Environment

  • Liferay PaaS

Resolution

Warning! The below steps completely delete all data in the Database and Document Library!

Warning! These steps should not be used in a production environment! They cannot be undone and the data cannot be recovered!

There are two tasks that must be done in order to reset the environment. Before performing either task, you must set the scale of the Liferay service to 1.

Delete The Document Library

  1. Navigate to the Liferay service of the environment you are trying to clean
  2. Click the Shell tab
  3. Paste the following code and execute
rm -r /opt/liferay/data/document_library

Delete The Database

You will need to copy the database credentials from your projects secrets(found on the Settings page).

  1. Navigate to the Liferay service of the environment you are trying to clean
  2. Click the Shell tab
  3. Paste the following code and execute(replace the User and Password with the copied credentials)
mysql -u User -pPassword -e "drop database lportal; create database lportal" && /opt/liferay/tomcat/bin/catalina.sh stop

 

After restarting the liferay service, a full reindex from Control Panel/Search/Index Actions might also be beneficial (and recommended).

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base