Skip to content

We use GridPane to manage almost 200 sites and that creates a lot of data to sort through. The GP backend lets us access data one site at a time, but it isn’t ideal for bulk management. Want to make sure 150 sites are all using the latest version of PHP? Be prepared to spend an hour clicking 300+ times.

In 2020 there was a site data export feature directly to CSV but it was disabled/retired when chat support systems changed. Thankfully this data can all be accessed via the GridPane API for Dev/Agency users.

We use Airtable internally for site management and there are a few steps to export/import the data. Integrating this data has been incredibly helpful cleaning up our sites. So far we’ve:

  • Fixed 20 sites with incorrect local backup schedules
  • Found 5 sites with sendgrid unintentionally disabled
  • Found 10 sites using older versions of PHP
  • Found 3 sites with incorrect PHP process managers
  • Found 8 sites with caching incorrectly set up
  • Fixed WAF settings on 34 sites
  • Fixed 10 sites that were stuck between 6G and 7G WAF (Changed from lua-resty)

Setup can be a little tricky. Here are some tips!

First, some useful links:

You can do this with or without Postman, but I chose to go that route. You can sign up for an account here.

Next, go watch the 13 minute Getting Started Video here. I really wish this was documented in text for people that don’t learn well from videos like myself, but it’s still very helpful. This walks you through the process to get the GP API set up within your GP and Postman.

Once Postman is set up, you’ll run get sites list to view all site data. However this only returns 10 sites by default. Add a query string to return more of your sites like this:

gridpane api get sites list

From here you can copy and paste that JSON text to a CSV converter into Airtable, however you’ll most likely find a lot of blanks. This is due to the various data points not being synced – the same issue you sometimes find on the GP backend when you need to Sync Settings to view the correct/latest data. Many of these fields were blank upon my first export:

  • site_security_settings/six_g_synced
  • site_security_settings/seven_g_synced
  • site_security_settings/modsec_synced
  • site_security_settings/wpfail2ban_synced
  • site_security_settings/additional_settings_synced
  • site_security_settings/access_settings_synced
  • site_customizer/nginx_cache_settings_synced
  • site_customizer/object_cache_settings_synced

So how do you sync all settings for all sites? This can be done with the GP CLI, but unfortunately it isn’t documented anywhere that I could find in the KB post. Using grep, I found the correct commands within opt/gridpane/repos/server-scripts/

  • gp site all-sites sync-php-settings
  • gp site all-sites sync-6g-settings
  • gp site all-sites sync-7g-settings
  • gp site all-sites sync-modsec-settings
  • gp site all-sites sync-wpf2b-settings
  • gp site all-sites sync-additional-security-settings
  • gp site all-sites sync-access-settings
  • gp site all-sites sync-nginx-cache-settings
  • gp site all-sites sync-object-cache-settings
  • gp site all-sites sync-cron-settings
  • gp site all-sites sync-nginx-settings

From here, you need to SSH into each of your servers and run the above commands. I made a snipped in Termius with the above lines of code – you can press it once, grab a coffee, and come back to all of your sites (mostly) synced. Repeat for the rest of your servers.

However! You’ll most likely run into rate limiting issues running all of these at once.

 “{“error”:{“code”:429,”message”:”Beep, Beep, you’re going too fast…”}}”

From GP Support regarding rate limits:

“There are currently strict limits in our API while it is in Beta. However, rate limits will increase and vary between endpoints once the API is out of Beta.

There still no estimates as to what these number would be, but the Agency Plan will have higher rate-limits when it rolls out.

Thank you for your understanding and participation in our Beta Program.”

You can either split up the commands above, try to run them a few times and hope for the best, or script a way to slow down requests. The latter is on my todo list, referencing example code provided by Jeff in the GP Community Form here. This isn’t really my thing though, and I’d love some advice.

Now that everything is updated, copy and paste the JSON into a CSV converter and then import into Airtable. Here’s an example table with dummy data:

From there, you can create views to check for specific issues like we did. See here: Screen Shot 2021 12 31 at 9.24.16 AM

We also use record linking to connect all this data to our site list, server list, customers, invoices, and internal plugin data. But that’s a post for another time!

Max Elman is Razorfrog's Founder and Project Manager. He is a tech-savvy internet guru and has led Razorfrog's award-winning web design team since 2008. View Max's bio for more details.

Toggle light/dark mode

Back To Top