# Removing the WordPress version number

> Hide the WordPress version number from your site's source code and dashboard footer with a short PHP snippet.

Source: https://helpcenter.ruachost.com/wordpress/guides/removing-wordpress-version-number/

By default, WordPress displays its version number in the site’s source code and in the dashboard footer. While this may seem harmless, exposing the version number can make your site more vulnerable to attacks targeting specific WordPress versions. On **ruachost.com**, you can hide or remove the version number using a simple PHP snippet.

## Why Remove the Version Number?

- Prevents attackers from identifying your WordPress version.
- Reduces the risk of automated exploits targeting outdated versions.
- Helps improve overall site security.

## Steps to Remove WordPress Version Number

1. **Log in to WordPress** with an administrator account.
2. In the dashboard, go to **Appearance → Theme Editor**.
3. From the right‑hand column, select the file named **functions.php**.
4. Scroll to the bottom of the file and add the following code:

   ```
   function remove_version() {
       return '';
   }
   add_filter('the_generator', 'remove_version');
   ```
5. Click **Update File** to save changes.

✅ WordPress will no longer display its version number in the site’s source code or footer.

## Important Notes

- Always **back up your site** before editing theme files.
- Consider creating a **child theme** to avoid losing changes during theme updates.
- Removing the version number does not replace the need to keep WordPress updated.
