Using Advanced Tools in the User Portal

NOTE: These tools are only made available to a small subset of customers. 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.


Add Duplicate Domains

Our system requires that a domain only be set for one account. However, for advanced users, we understand that your workflow sometimes requires that you have a domain name on two or more installs. If this is the case, when you add a domain that already exist on another install, you will receive an error (like the one below) but you will have the option to add the domain anyway. Just check the box and continue adding the domain.

Please note that by adding duplicate domains to our system, you could potentially be at risk for issues further down the road. Whenever you do not need a duplicate domain, we strongly recommend that you remove the domain from the location where it is no longer needed.


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

Still need help? Contact support!

We offer support 24 hours a day, 7 days a week, 365 days a year. Log in to your account to get expert one-on-one help.

The best in WordPress hosting.

See why more customers prefer WP Engine over the competition.