↑ ↓ select, Enter open, Esc close

Remove the search engine block in WordPress

Caution: This command changes the system. Understand what it does before you run it.

Adjust the values, the command updates live
user@server
wp option update blog_public 1 --path=/var/www/vhosts/example.com/httpdocs

Equivalent to unchecking “Discourage search engines from indexing this site” under Settings, Reading. A common SEO mistake after a staging site goes live. Afterwards, the noindex in the header is gone and the virtual robots.txt no longer blocks crawlers.

Note: On a staging environment, deliberately keep the value at 0. Clear caches afterwards so the new meta tag is served.

Also searched as

  • site not on google after relaunch
  • turn off discourage search engines
  • remove noindex after go live

Related one-liners

All in WP-CLI

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.