No ‘Add New’ Button on WordPress Plugins Page?

Plugins - Add New

I found this issue on a WordPress site which which makes use of the Roots Trellis and Bedrock tools (https://roots.io/). By default the config/environments/staging.php and production.php files have this line in them:

As detailed in the WP Codex (https://codex.wordpress.org/Editing_wp-config.php#Disable_Plugin_and_Theme_Update_and_Installation), this will block users being able to use the plugin and theme installation/update functionality from the WordPress admin area.

The default Trellis development.php doesn’t have this config setting in there, so it’s only when you deploy to staging/production that you’ll see the issue.

Might save someone a few minutes reading this!

No ‘Delete’ link showing for a WordPress theme?

WordPress Themes

Within WordPress admin, you can normally delete a theme from a site by clicking on the theme, within Appearance->Themes, and then clicking on the ‘Delete’ button in the bottom right hand corner of the pop-up window.

For obvious reasons you can’t delete the active theme, so if you want to delete that then you’ll need to activate another theme first. However, it’s important to note that you also won’t see the ‘Delete’ button on a theme if the active theme is a child of that theme. So for example if the ‘Ingham Creative’ theme is a child theme (see https://codex.wordpress.org/Child_Themes) of ‘Twenty Fourteen’, then I can’t delete ‘Twenty Fourteen’ whilst ‘Ingham Creative’ is the active theme, or unless I change ‘Ingham Creative’ to use a different parent theme.