Skip to content

Connectors screen: Users are blocked on sites with a read-only file system (DISALLOW_FILE_MODS) #77352

Closed

Description

@westonruter

Description

This is a follow-up to #75980 (and #77089).

Normally, the Connectors screen looks as follows on a fresh install:

Image

However, when DISALLOW_FILE_MODS is enabled in an environment, it looks like this:

Image

This is not helpful, because a user is completely blocked from knowing how to enable the AI functionality. I know that on Pantheon, for example, all production live environments have a readonly filesystem. This is an issue for any site configured with the DISALLOW_FILE_MODS constant enabled in wp-config.php. Users will have no idea how to proceed.

Suggestions:

  • A notice should be added that explains that plugin installation is disabled due to the DISALLOW_FILE_MODS constant. Users should perhaps be advised to install the AI plugin and AI provider plugins manually as they normally install plugins on their environment. Perhaps even a WP-CLI command could be displayed for each plugin, which would be particularly useful in this case since it is likely that Git is being used to manage the site.
  • There is no context for the "Not available" message. A link to the plugin on the directory should be displayed for each.
  • The AI plugin banner should still be shown, but with a "Learn More" link instead of installation button.
  • The paragraph at the bottom should remain, with an external link to the tag search on the localized plugin directory, e.g. https://wordpress.org/plugins/search/ai-connectors/

There is a similar issue faced by the Performance Lab plugin in the feature install screen, which also involves installing a plugin when a feature is activated. See WordPress/performance#1138 and WordPress/performance#1148 (comment).

Step-by-step reproduction instructions

  1. Add define( 'DISALLOW_FILE_MODS', true ); to the wp-config.php.
  2. Access the Connectors screen.

Screenshots, screen recording, code snippet

No response

Environment info

  • WordPress trunk (7.1-alpha)
  • Gutenberg trunk at b30d634

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Activity

  1. added
    [Type] Bug
    [Feature] Connectors screen
    on Apr 15, 2026
  2. coderGtm commented on Apr 16, 2026

    @coderGtm
    Contributor

    Hello,

    I would like to work on this issue. Is there a consensus on which of the provided suggestions to work upon and anything I should keep in mind before working on it?

    If required I can work on all of the suggested pointers.

    Thanks!

  3. coderGtm commented on Apr 20, 2026

    @coderGtm
    Contributor

    I started with the notice. Sharing it here for feedback and keeping everyone in loop.

    Image
  4. moved this from 📥 Todo to 📋 Iteration/Tracking Issues in WordPress 7.0 Editor Taskson Apr 21, 2026
  5. added
    [Status] In Progress
    on Apr 21, 2026
  6. moved this from 📋 Iteration/Tracking Issues to 📥 Todo in WordPress 7.0 Editor Taskson Apr 27, 2026
  7. moved this from 📥 Todo to 🏗️ In Progress in WordPress 7.0 Editor Taskson May 4, 2026
  8. fcoveram commented on May 4, 2026

    @fcoveram
    Contributor

    The notice above shows information that could confuse and alarm users not familiar with them. The notice messages should be simpler and provide links to solve and/or understand what's going on.

    We're discussing here (WordPress/ai#457) the flow for the happy path, and this issue could tap into that same design.


    If I understand the problem correctly, the are two blockers for installing the Connector plugins. Those are not errors but system conditions that limit user actions. If so, then the use cases for not being able to install plugins are:

    • Disabled for the user at the system level. User need to contact an admin.
    • Disabled for the user at the system level. User needs to do it manually by going to the plugin directory or via WP-CLI.

    If the above is correct, then I suggest showing two different screens with different messages. Here is a mockup for each.

    Image
  9. westonruter commented on May 4, 2026

    @westonruter
    MemberAuthor

    Note: I'm seeing a similar blocked experience for non-superadmin admin users currently on Multisite (trunk at 7.1-alpha-62295 without Gutenberg):

    Image

    Otherwise, an admin user without install_plugins capability or an admin user with file_mod_allowed disabled see what I shared initially (with #77897 checked out):

    Image
    Plugin: Disable File Mods

    <?php
    /**
     * Plugin Name: Disable File Mods
     * Description: Filters file_mod_allowed to return false.
     */
    
    add_filter( 'file_mod_allowed', '__return_false' );

    Plugin: Disable Install Plugins Capability

    <?php
    /**
     * Plugin Name: Disable Install Plugins Capability
     * Description: Prevents the current user from having the install_plugins capability.
     */
    
    add_filter(
    	'user_has_cap',
    	static function ( $allcaps ) {
    		$allcaps['install_plugins'] = false;
    		return $allcaps;
    	}
    );

    @fcoveram I like your designs, especially the first one for the case where a user lacks install_plugins but file_mod_allowed is not disabled. This is clearly a case where they need to escalate to an administrator who is able to install the plugin.

    For the second case, however, where an admin user cannot install_plugins and file_mod_allowed is disabled, then this indicates the admin user themselves are likely responsible for installing the plugins using an alternative mechanism (e.g. WP-CLI). Where would the two CTAs lead? My assumptions:

    It seems either both or neither should get the external link icon. (Aside: neither of these are localized, which may or may not be a problem.)

    In order to install the plugin manually, it is important that they know what the plugin slug is in order to install it. In the UI right now, there is no indication for how to find the plugins being listed here. I think instead of a disabled “Install” button it would make sense to show “Learn more” which opens the plugin on the directory. This would allow the administrator to learn what the plugin slug is, so they can install manually with WP-CLI, e.g. via wp plugin install ai-provider-for-anthropic. Alternatively, clicking that “Learn more” button could expand the plugin card with additional information including the WP-CLI command to use in addition to the link to the plugin on the directory.

    In both cases, for users who can't install plugins for any reason, I think it is useful to provide that “Learn more” link so they can discover what plugin specifically needs to be installed. For example, an admin who can't install plugins may want to message the super-admin: "Hey, please install and activate this plugin: https://wordpress.org/plugins/ai-provider-for-anthropic/"

    As you've showed in your designs, I think it does make sense to show this paragraph at the end:

    If the connector you need is not listed, search the plugin directory to see if a connector is available.

    Currently this paragraph is omitted for users without that capability. It's just that when the user cannot install plugins, the link will need to go directly to the plugin directory and not to /wp-admin/plugin-install.php?s=connector&tab=search&type=tag. (Just to reiterate what was already suggested above.)

  10. coderGtm commented on May 5, 2026

    @coderGtm
    Contributor

    @fcoveram I loved the design. However, I'd like to clearly state the conditions just for clarity. Instead of

    If I understand the problem correctly, the are two blockers for installing the Connector plugins. Those are not errors but system conditions that limit user actions. If so, then the use cases for not being able to install plugins are:

    • Disabled for the user at the system level. User need to contact an admin.
    • Disabled for the user at the system level. User needs to do it manually by going to the plugin directory or via WP-CLI.

    More clearly,

    • User not having the permission to install plugins. It is not disabled at system level.
    • Plugin installation from UI disabled at system level so even admins cannot install it from the UI. Only manual methods like FTP or WP-CLI can be used.

    We can frame it in a better way. Just wanted to share the exact conditions.

  11. moved this from 🏗️ In Progress to ✅ Done in WordPress 7.0 Editor Taskson May 8, 2026
  12. westonruter commented on May 13, 2026

    @westonruter
    MemberAuthor

    New related Trac ticket:

    • Core-65223: Connectors plugin install flow does not show filesystem credentials form when FTP is required
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[Feature] Connectors screen[Status] In Progress[Type] Bug

Type

No type

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions