Remove the WordPress Version Number to Get Rid of the Backend Upgrade Notification

3,672 0

Every time WordPress releases a major version update, the backend always displays a prominent update notification box. Moreover, this notification cannot be closed, making it quite distracting. To remove this update notification, I researched a method that involves modifying the version number. It is very simple and practical. Next, I will explain in detail how to remove the WordPress update notification and modify the version number.

Specific Steps

Method 1: Remove the Update Notification by Modifying the Version Number

  1. Open the file /wp-includes/version.php.
  2. Find the $wp_version variable.
  3. Change the value of $wp_version to a higher version number, for example:
    Original code:
    PHP
    $wp_version = '4.7.0';
    
    After modification:
    PHP
    $wp_version = '5.0.0';
    

In this way, you not only modify the version number but also successfully suppress the update notification in the WordPress backend, achieving two goals at once.

Notes:
Although this method is simple, it is not recommended for long-term use. In particular, when official important security patches are released, be sure to update WordPress promptly to avoid being attacked by hackers due to vulnerabilities.

Method 2: Remove Only the Backend Update Notification Without Modifying the Version Number

If you want to retain the current version number while hiding the annoying update notification box in the backend, you can do so through the following steps:

  1. Open the file wp-admin/includes/update.php.
  2. Find the following code:
    PHP
    echo "<div id='update-nag'>$msg</div>";
    
  3. Delete or comment out this line of code.

After saving the changes, the update notification will no longer be displayed, while the version number will remain unchanged.

Recommendations

Although hiding update notifications can make the backend look cleaner, WordPress updates often involve security fixes, especially patches for major vulnerabilities. Therefore, it is recommended to regularly check the official WordPress update information and upgrade the version promptly to ensure the security of your website.

Effect of Removing the WordPress Update Notification

Comments

(0)

No comments yet. Start the conversation.

Leave a comment