You are here

README.txt in Delete all 7

Same filename and directory in other branches
  1. 8 README.txt
  2. 2.x README.txt
DELETE ALL
----------
 
CONTENTS OF THIS FILE
---------------------
 * Introduction
 * Requirements
 * Installation
 * Usage
 * Maintainers

INTRODUCTION
------------
This module is used to delete all content and/or users from a site.
This is mainly
a developer tool, which can come in handy in several cases, listed below.

The usual way to do this is to go to Administer -> Content then select all the
nodes and delete them. This works if you have a handful of nodes only. If you
have hundreds or thousands of nodes, then it is not a practical solution.

Another option is to directly delete the nodes from the node table in
the database. This does not work properly, since there are also comments,
and many tables for add on modules that needs to be cleaned.

This is a test site that the client was using for a period of time, and they
must clean it up before starting with real data.
You are testing something that creates a lot of nodes (e.g. aggregator), and
want to do it over and over again.
You created a site in the past and want to replicate it again,
but with new content.

Note that for nodes, comments and all additions to nodes that contributed
modules may have added. For users, any additional module data
will also be deleted.

REQUIREMENTS
------------
None.

INSTALLATION
------------
 * Install as usual,
 see https://www.drupal.org/documentation/install/modules-themes/modules-8
 for further information.

USAGE
-----

 * Drush
   ------
    drush delete-all
    Example: drush delete-all article

Drush on Drupal 7 version
-------------------------
Delete all nodes, nodes of a specific content type or users.

Examples:

 drush delete-all article             Delect all article nodes.
 drush delete-all all                 Delete nodes of all types.
 drush delete-all --reset             Delete nodes of all types, and reset node,
                                      revision and comment counters.
 drush delete-all users               Delete users.

Options:

 --reset                              Reset counter for node, revision and
                                      comment tables.
 --roles                              pick roles

Aliases: da

Drupal Admin

In order to use this module, install it it and enable it as with any other
module. You will then see two new entries, one under Administer -> Content,
and the other under Administer -> Users. A confirmation message will be
displayed before the actual deletion happens.

When deleting nodes, you can select to delete all nodes, or just delete
nodes by type.

There are also two methods for deleting nodes. The "normal" method uses
node_delete, and is the preferred way of doing things. But if your site has
hundreds or thousands of nodes, node_delete can take quite long. The "quick"
method is for these cases when there are thousands of nodes. It deletes
everything using SQL by joining the tables. Since it deletes thousands of
nodes at a time in a single sql statement and bypasses lots of php and the
module's hook_delete, it's much quicker. But it's not as safe a way of
deleting as using the "normal" method.

MAINTAINERS
-----------
 * Dipak Yadav (dipakmdhrm) - https://www.drupal.org/u/dipakmdhrm
 * Hammad Ghani (hammad-ghani) - https://www.drupal.org/u/hammad-ghani
 * Khalid Baheyeldin (kbahey) - https://www.drupal.org/u/kbahey
 * Brian Gilbert (realityloop) - https://www.drupal.org/u/realityloop
 * Kevin O'Brien (coderintherye) - https://www.drupal.org/u/coderintherye
 * Git Migration - https://www.drupal.org/u/git-migration
 * Doug Green (douggreen) - https://www.drupal.org/u/douggreen

File

README.txt
View source
  1. DELETE ALL
  2. ----------
  3. CONTENTS OF THIS FILE
  4. ---------------------
  5. * Introduction
  6. * Requirements
  7. * Installation
  8. * Usage
  9. * Maintainers
  10. INTRODUCTION
  11. ------------
  12. This module is used to delete all content and/or users from a site.
  13. This is mainly
  14. a developer tool, which can come in handy in several cases, listed below.
  15. The usual way to do this is to go to Administer -> Content then select all the
  16. nodes and delete them. This works if you have a handful of nodes only. If you
  17. have hundreds or thousands of nodes, then it is not a practical solution.
  18. Another option is to directly delete the nodes from the node table in
  19. the database. This does not work properly, since there are also comments,
  20. and many tables for add on modules that needs to be cleaned.
  21. This is a test site that the client was using for a period of time, and they
  22. must clean it up before starting with real data.
  23. You are testing something that creates a lot of nodes (e.g. aggregator), and
  24. want to do it over and over again.
  25. You created a site in the past and want to replicate it again,
  26. but with new content.
  27. Note that for nodes, comments and all additions to nodes that contributed
  28. modules may have added. For users, any additional module data
  29. will also be deleted.
  30. REQUIREMENTS
  31. ------------
  32. None.
  33. INSTALLATION
  34. ------------
  35. * Install as usual,
  36. see https://www.drupal.org/documentation/install/modules-themes/modules-8
  37. for further information.
  38. USAGE
  39. -----
  40. * Drush
  41. ------
  42. drush delete-all
  43. Example: drush delete-all article
  44. Drush on Drupal 7 version
  45. -------------------------
  46. Delete all nodes, nodes of a specific content type or users.
  47. Examples:
  48. drush delete-all article Delect all article nodes.
  49. drush delete-all all Delete nodes of all types.
  50. drush delete-all --reset Delete nodes of all types, and reset node,
  51. revision and comment counters.
  52. drush delete-all users Delete users.
  53. Options:
  54. --reset Reset counter for node, revision and
  55. comment tables.
  56. --roles pick roles
  57. Aliases: da
  58. Drupal Admin
  59. In order to use this module, install it it and enable it as with any other
  60. module. You will then see two new entries, one under Administer -> Content,
  61. and the other under Administer -> Users. A confirmation message will be
  62. displayed before the actual deletion happens.
  63. When deleting nodes, you can select to delete all nodes, or just delete
  64. nodes by type.
  65. There are also two methods for deleting nodes. The "normal" method uses
  66. node_delete, and is the preferred way of doing things. But if your site has
  67. hundreds or thousands of nodes, node_delete can take quite long. The "quick"
  68. method is for these cases when there are thousands of nodes. It deletes
  69. everything using SQL by joining the tables. Since it deletes thousands of
  70. nodes at a time in a single sql statement and bypasses lots of php and the
  71. module's hook_delete, it's much quicker. But it's not as safe a way of
  72. deleting as using the "normal" method.
  73. MAINTAINERS
  74. -----------
  75. * Dipak Yadav (dipakmdhrm) - https://www.drupal.org/u/dipakmdhrm
  76. * Hammad Ghani (hammad-ghani) - https://www.drupal.org/u/hammad-ghani
  77. * Khalid Baheyeldin (kbahey) - https://www.drupal.org/u/kbahey
  78. * Brian Gilbert (realityloop) - https://www.drupal.org/u/realityloop
  79. * Kevin O'Brien (coderintherye) - https://www.drupal.org/u/coderintherye
  80. * Git Migration - https://www.drupal.org/u/git-migration
  81. * Doug Green (douggreen) - https://www.drupal.org/u/douggreen