Introduction
Welcome, developers! This guide will dive into an essential feature in Empress: the Site Reinstall Feature. This feature is crucial for managing MariaDB sites, offering the capability to wipe all site data and start anew. Please note that this action is destructive and comes with an interactive confirmation prompt by default.
Understanding the Site Reinstall Feature
The Site Reinstall Feature is designed to reinstall a site with the current apps. This operation erases all site data, effectively giving developers a clean slate to work with. Although inherently destructive, this feature can be a lifesaver in situations where a fresh start is necessary.
Code Snapshot
bench reinstall [OPTIONS]
Key Functionalities and Advantages
Administrator Password Specification
Developers can specify an administrator password for the reinstalled site using the --admin-password
option. This adds an extra layer of security to the site, ensuring that only authorized personnel can access the fresh installation.
--admin-password {admin-pass}
MariaDB Root User Specification
The --mariadb-root-username
and --mariadb-root-password
options allow developers to provide the root username and password for MariaDB. These options are particularly useful when the developer wants to use an alternative user with DBMS SUPER privileges.
--mariadb-root-username {db-user}
--mariadb-root-password {db-pass}
Confirmation Skip
The --yes
flag enables developers to skip the confirmation for reinstall, making the process more streamlined and less interruptive. This feature should be used judiciously, considering the destructive nature of the operation.
--yes
Examples
Here are some examples demonstrating how to use the Site Reinstall Feature:
Example 1: Reinstall a site with automatic confirmation, MariaDB root password, and administrator password
bench reinstall {site} --yes
--mariadb-root-password {db-pass}
--admin-password {admin-pass}
Example 2: Reinstall a site using an alternative user with DBMS SUPER privileges
bench reinstall
--mariadb-root-username {db-user}
--mariadb-root-password {db-pass}
Conclusion
The Site Reinstall Feature significantly contributes to the development and customization of business solutions in Empress. It allows developers to effectively manage their MariaDB sites, offering the flexibility to reset and start afresh when necessary. By understanding and utilizing this feature, developers can significantly enhance their efficiency and productivity while working with Empress.