Using Advanced Tools in the User Portal

NOTE: These tools are only made available to a small subset of customers on a case-by-case basis. If you are simply looking for WP CLI or direct file access, check out SSH Gateway instead.


Read-Only Filesystem

When this tool is enabled, changes cannot be made to your site’s code using the WordPress Admin Dashboard. The only way to make changes would be using  Git or SFTP. This tool also disables the ability to install or update your plugins, themes, and WordPress core files.


Cache Exclude Paths

This tool allows users to exclude a specific page or URI path from our Page Cache. It’s important to be very specific when choosing which pages should be excluded from cache, since caching helps ensure your site can be served quickly and scale when more traffic is sent to it.

We highly recommend excluding only the specific page(s) running into caching conflicts. Some examples of pages which might be good to exclude from cache:

  • Any custom login page URL
  • A cart or checkout page which is not named “cart,” “checkout,” or “check-out” (these are already excluded from cache)
  • A page which requires dynamic results to show for different users who are not logged into the site.

The tool accepts regular expressions (regex), meaning entering just “/foo” would match /bar/foo as well as /bar/foo/baz, whereas entering “^/foo” would only match URI paths which start with /foo (matches /foo/bar but not /bar/foo).


Cache Exclude Query Arguments

Similar to “Cache-exclude: Paths,” this tool allows users to exclude requests from our Page Cache based on the query argument or variable added to the end of the URL.

If I had the URL mydomain.com/?page=home and I needed anything using the “page” variable to not be cached, I would enter “page” in this section. This section also accepts regular expressions.

Since these variables could be tagged onto any URL, it’s important to only exclude variables which will be used sparingly, and only those which absolutely require the page to be excluded from cache.


Perm-Reload-Apply

This command regenerates all configuration files for the site, including the wp-config.php file. It resets file permissions, regenerates our server configuration files, and gracefully reloads our server software.

Please use this command sparingly, since it can use up a lot of server resources to perform this command. This button should only be used when configuration changes have been made, but the changes aren’t being reflected or taking effect.


WP CLI

WP CLI is a set of tools for managing WordPress using a text-based command line interface, rather than the standard WordPress Admin Dashboard. Using WP CLI, some management tasks can be performed faster and more easily, like updating plugins, regenerating thumbnails, or managing users.

You can find a list of supported commands and known issues here.


Known Issues

Unsupported Commands

The following commands are unsupported in our web console version of WP-CLI:

  • cli update
  • cli check-update
  • core multisite-convert
  • db check
  • db optimize
  • db repair
  • db cli
  • db drop
  • db create
  • eval
  • eval-file
  • shell
  • scaffold plugin-tests

The following commands have known issues, and should not be used at this time:

  • menu item
  • db query
  • plugin uninstall
  • post create
  • post edit
  • rewrite flush [--hard]
  • user import-csv
  • widget update
  • plugin is-installed
  • theme is-installed
  • cache type

Invalid or unsupported command Error

If you receive  “Invalid or unsupported command” messages from the command prompt while running a command, please contact support.

Long Queries in wp db

If you try to run a query that is longer than 1024 characters you may receive the following message:

Error: It looks like you’re trying to perform a long query. For performance reasons, our system is optimized to not allow long queries. If you need this query run, you can contact our Support team or set the following wp-config.php option and rerun your query:
define( ‘WPE_GOVERNOR’, false );

After setting the above wp-config.php option we recommend you remove this entry after you run your needed command.

Documentation Syntax

Due to the nature of our web console interface, If you are running a command that requires confirmation, you should always use the --yes flag to provide that confirmation.

The following commands require somewhat different syntax than is shown in the help command syntax:

CommandCorrect syntax
wp media regenerate [<attachment-id>...] [--yes]--yes parameter is required
wp site create --slug=<slug> [--title=<title>] [--email=<email>] [--network_id=<network-id>] [--private] [--porcelain]Example: wp site create --slug=test-2
wp site delete [<site-id>] [--slug=<slug>] [--yes] [--keep-tables]Example: wp site delete 17
wp term create <taxonomy> <term> [--slug=<slug>] [--description=<description>] [--parent=<term-id>] [--porcelain]Example: wp term create category Apple
wp theme disable <theme> [--network]Multisite only: Example: wp theme disable twentyfifteen
wp theme enable <theme> [--network] [--activate]Multisite only: Example: wp theme enable twentythirteen --activate
wp theme get <theme> [--field=<field>] [--format=<format>]Multisite only: Example: wp theme get twentytwelve --format=json
wp user add-cap <user> <cap>Example: wp user add-cap joeuser create_premium_item
wp user add-role <user> <role>Example: wp user add-role joeuser author
wp user create <user-login> <user-email> [--role=<role>] [--user_pass=<password>] [--user_registered=<yyyy-mm-dd>] [--display_name=<name>] [--first_name=<first_name>] [--last_name=<last_name>] [--send-email] [--porcelain]Example: wp user create joeuser [email protected] --role=author
wp user delete <user>... [--network] [--reassign=<user-id>] [--yes]Example: wp user delete ID --yes
wp user get <user> [--field=<field>] [--fields=<fields>] [--format=<format>]Example: wp user get joeuser
wp user list [--role=<role>] [--<field>=<value>] [--field=<field>] [--fields=<fields>] [--format=<format>]Example: user list --role=author
wp user list-caps <user>Example: wp user list-caps joeuser
wp user meta <command>Example: wp user meta update admin first_name "Joe"
wp user remove-cap <user> <cap>Example: wp user remove-cap joeuser edit_themes
wp user remove-role <user> [<role>]Example: wp user remove-role joeuser author
wp user set-role <user> [<role>]Example: wp user set-role joeuser author
wp user update <user>... --<field>=<value>Example: wp user update joeuser --display_name=Joe --user_pass=examplepassword
widget add <name> <sidebar-id> [<position>] [--<field>=<value>]Example: wp widget add rss sidebar-1
wp widget deactivate <widget-id>...Example: wp widget deactivate search-2
wp widget delete <widget-id>...Example: wp widget delete calendar-3
wp widget list <sidebar-id> [--fields=<fields>] [--format=<format>]Example: wp widget list sidebar-1
wp widget move <widget-id> [--position=<position>] [--sidebar-id=<sidebar-id>]Example: wp widget move calendar-1 --sidebar-id=sidebar-1
--url=<url>Multisite only

NEXT STEP: Connect to your WordPress site using SSH

Code-level performance analytics

Application Performance provides real-time, code-level visibility to help you troubleshoot faster, optimize WordPress experiences, and increase development agility.