Make WordPress Core

Opened 13 months ago

Last modified 12 months ago

#51358 new enhancement

Add a clearer warning message before deleting a site from a network

Reported by: johnbillion Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 3.0
Component: Networks and Sites Keywords: has-screenshots needs-patch
Focuses: administration, multisite Cc:


Deleting a site from the Network Admin -> Sites screen is the most destructive single action that a user can take on a WordPress installation.

After clicking the Delete link the user is shown a screen requesting confirmation, but this screen doesn't convey the permanence of the action they're about to take.

There is no trash or undo when deleting a site. It drops the database tables for the site, empties its uploads directory of all files, and removes the roles for that site from all users.

Let's add an extra warning to this confirmation screen which explains this.

Attachments (3)

51358.diff (1.2 KB) - added by johnbillion 13 months ago.
Screenshot 2020-09-19 at 21.44.58.png (58.6 KB) - added by johnbillion 13 months ago.
51358_sentence_case.diff (1.2 KB) - added by kebbet 13 months ago.

Download all attachments as: .zip

Change History (13)

13 months ago

#1 @johnbillion
13 months ago

  • Keywords has-patch added; needs-patch removed

51358.diff adds an extra warning to the confirmation screen when deleting a site, and changes the submit button text for further clarity.

#2 @johnbillion
13 months ago

  • Keywords has-screenshots added

#3 @johnjamesjacoby
13 months ago

This is a big +1 from me. I love the patch. It’s a nice improvement.

I’d like to see more here! What if we added a little summary of all the things you mentioned in the ticket description? An indication of the irreversible destruction that’s about to happen might provide enough context to make this screen perform its intended function better, avoiding unintended catastrophic data obliteration.

Deleting this site will irreversibly delete the following:

  • 200 posts
  • 64Mb of media
  • 7 user associations

The following plugins are currently active on this site. Use these to help with deciding if deleting this site is still OK.

  • bbPress
  • Sugar Calendar

#4 @kebbet
13 months ago

  • Keywords needs-patch added; has-patch removed

There is a strive towards using sentence case in core from my understanding. I think the button text should be “Delete this site permanently”.


#5 @johnbillion
13 months ago

@kebbet Thanks, is that documented somewhere? I copied the button text from the button on the Tools -> Delete Site screen.

@johnjamesjacoby That's a really interesting idea but I wonder whether it would make the screen a bit too busy?

#6 @kebbet
13 months ago

@johnbillion I guessed that question was coming ;) A quick search on trac for ”sentence case” results in some tickets, but I could not find an announcement on the topic.
whyisjake states it here e.g. https://core.trac.wordpress.org/ticket/40244#comment:22
Another ticket on the topic #51371

#7 @kebbet
13 months ago

My first patch ever, downloaded the previous one and edited it. Maybe I did it in an incorrect way, happy for any feedback :D

#8 @johnbillion
13 months ago

I just realised this doesn't cover bulk site deletion.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.

12 months ago

#10 @hellofromTonya
12 months ago

  • Milestone changed from 5.6 to Future Release

During today's scrub, @johnbillion noted there's more work to do and to punt this one to Future Release.

If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

Note: See TracTickets for help on using tickets.