Avoid Accidental Publishing

Avoid Accidental Publishing in WordPress

Sometimes we accidentally hit the publish button when our post or page is incomplete or not ready to publish. Many bloggers and site owners set up automatic processes to send email to their subscribers and share posts on social media.

Accidental publishing is problematic because your posts can get shared and sent to email subscribers when you hit the publish button.

Avoid Accidental Publishing

However, if an incomplete post or page goes live, then it is a bit embarrassing and you have to unpublish it.

Unpublishing the post or page means your users will see a 404 error when they click on links in their email or social media stream.

That’s why we need to stop Accidental Publishing in WordPress.

In this article, I will show you how to easily avoid accidental publishing in WordPress.

The first thing you need to do is install and activate the Publish Confirm plugin.

Now when you hit the publish button in WordPress, you will see a popup asking if you really want to publish the post.

Avoid Accidental Publishing Confirm

The plugin works for all posts and pages as well as custom post types.

You can also change the message displayed in the confirmation popup.

You will need to add the following code to your theme’s functions.php file

function my_custom_msg() { 

return "Is it ready to Publish?";

}    

add_filter('publish_confirm_message','my_custom_msg');
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)
Loading...
The following two tabs change content below.

Wasim Sama

Wasim Sama is a passionate blogger and experienced web developer.

Leave a Reply

Your email address will not be published. Required fields are marked *