Skip to content

Commit

Permalink
Add cleanup phpcr database (#791)
Browse files Browse the repository at this point in the history
* add cleanup phpcr database

* Apply suggestions from code review

Co-authored-by: Prokyonn <[email protected]>

---------

Co-authored-by: Prokyonn <[email protected]>
  • Loading branch information
wachterjohannes and Prokyonn authored Apr 28, 2024
1 parent 2e197e8 commit 7b3228b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cookbook/cleanup-phpcr-database.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Cleanup PHPCR database
======================

If you have an older installation of Sulu, you may be dealing with a database cluttered with outdated PHPCR properties.
This is particularly common if you’ve made significant changes to your templates or content types over time.
To tidy up your database, try running the following command:

.. code-block:: bash
php bin/console sulu:document:phpcr-cleanup
The command is quite powerful, but exercise caution when deploying it in a production environment.
It will remove all properties not currently utilized in your templates. To avoid potential pitfalls, ensure you have a
backup of your database in place before executing this command.
1 change: 1 addition & 0 deletions cookbook/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ our recipes.
user-context-caching
build-admin-frontend
multi-server-setup
cleanup-phpcr-database

It is possible to work through the recipes, although most of the people will
pick the ones, which are most similar to their own tasks. We're open to
Expand Down

0 comments on commit 7b3228b

Please sign in to comment.