Here's How To Hide Admin Panel Menus In Strapi

  • strapi
  • hide admin panel menus
  • admin panel

To cut the chase and save some time, I've created a quick guide to help you hide the admin panel menus in Strapi.

Method 1: Using the admin plugin configuration

  1. Create a config/env/production/admin.js file in your Strapi project.
  2. Copy the contents from that of config/admin.js file and paste it in the admin.js file you just created.
  3. Replace the values for flags.nps and flags.promoteEE to false.
module.exports = ({ env }) => ({
  auth: {
    secret: env('ADMIN_JWT_SECRET'),
  },
  apiToken: {
    salt: env('API_TOKEN_SALT'),
  },
  transfer: {
    token: {
      salt: env('TRANSFER_TOKEN_SALT'),
    },
  },
  flags: {
    nps: env.bool('FLAG_NPS', false),
    promoteEE: env.bool('FLAG_PROMOTE_EE', false),
  },
})

Method 2: Setting config / env variables

  1. In your Strapi provider, there should be an option to set config / env variables. Add the following variables to your config / env variables.
FLAG_NPS = false
FLAG_PROMOTE_EE = false
  1. Save and redeploy your Strapi project.
  2. Voila. Done!

  • NOTE: Tested on Strapi v4.0.0 and above.
  • NOTE2: Settings Menu will still be there but it will only show the Overview submenu and no longer the other submenus.

More articles

End-to-End Testing with Sanity Studio & Playwright

Learn how to do end-to-end test Sanity Studio with Playwright

Read more

Best and safely update an Array element using @sanity/client - Sanity.io

Here's how you can safely update an Array element of a given field in a Sanity document - Sanity.io

Read more

Let's talk about your project