Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Turning off Admin in production

admin

Started by Gabe Casalett 5 years ago · 3 replies · 619 views
5 years ago

Hello! I'm working on a microsite for a client who is very concerned about security. Their standard procedure is to run a copy of their CMS on a local server for editing, and then have a copy of the site on the production server with the admin area disabled in some way, depending on the CMS (for example, for Drupal and WordPress, they strip the users table on the prod db).

My idea for Grav is for the prod server to NOT have the admin plugin installed at all; If my understanding is correct, that will prevent anyone from editing the site (other than meddling with the files directly).

Is my understanding correct? Also, how would I (or they) set up a pipeline? Could we only maybe only push the pages folder from dev to prod when changes happen?

I feel like there's not a lot of info about this topic out there, so any help would be greatly appreciated!

5 years ago

@gcasalett, You might want to have a look at the Git Sync plugin.

Git Sync is a Plugin for Grav CMS that allows to seamlessly synchronize a Git repository with your Grav site, and vice-versa.

You could also roll your own git sync procedure.

Or you can zip the /user folder on the local machine, scp to remote server, and unzip.

Or you could just disable the Admin panel by setting enabled: false in /user/config/plugins/admin.yaml

👍 2
last edited 10/31/21 by pamtbaau
5 years ago

Awesome, thanks for the response! I'll try these options and see which one best fits their current setup.

5 years ago

Are you running continuous deployment through an automation pipeline? If so you can simply ignore the user/accounts folder in your .gitignore file and set a different admin user in production which nobody knows the credentials for.

Suggested topics

Topic Participants Replies Views Activity
General · by Jerry Hunt, 4 days ago
2 80 9 hours ago
General · by pamtbaau, 14 hours ago
1 51 13 hours ago
General · by Andy Miller, 1 day ago
0 44 1 day ago
General · by Marcel, 12 months ago
6 346 5 days ago
General · by Duc , 5 days ago
3 40 5 days ago