WP-CLI Commands

Using WP-CLI you can change the SiteGround Security plugin settings from the command prompt. Here are all available SiteGround Security WP-CLI commands and short explanation what they do:

  • wp sg limit-login-attempts 0|3|5 – limits the login attempts to 3 or 5. 0 in order to disable the functionality
  • wp sg login-access add IP – allows only specific IP(s) to access the back-end of the website
  • wp sg login-access list all – lists the whitelisted IP addresses
  • wp sg login-access remove IP – removes IP from the whitelisted ones
  • wp sg login-access remove all – removes all of the whitelisted IP addresses
  • wp sg secure protect-system-folders enable|disable – enables or disables the protect system folders option
  • wp sg secure hide-wordpress-version enable|disable – enables or disables the hide WordPress version option
  • wp sg secure plugins-themes-editor enable|disable – enables or disables the plugin and theme editor
  • wp sg secure xml-rpc enable|disable – enables or disables XML-RPC
  • wp sg secure rss-atom-feed enable|disable – enables or disables RSS and ATOM feeds
  • wp sg secure xss-protection enable|disable – enables or disables XSS protection
  • wp sg secure 2fa enable|disable – enables or disables two-factor authentication
  • wp sg secure disable-admin-user enable|disable – enables or disables usage of “admin” as username

For more information on how to use WP-CLI, please check out our WP-CLI Tutorial.

Share This Article