Skip to content

Instantly share code, notes, and snippets.

@ramiwds
Created February 5, 2024 16:21
Show Gist options
  • Save ramiwds/881c4dd5209a0f0097de4c1b6d38309a to your computer and use it in GitHub Desktop.
Save ramiwds/881c4dd5209a0f0097de4c1b6d38309a to your computer and use it in GitHub Desktop.
Reset WP Engine file permissions on the site itself. Requires WPE API to be active for specified account.
<?php
/**
* Rset file permissions on a WPE customer site (without signing-in to a dashboard)
*
* Adapted from the WPE mu-plugin present on all customer sites, at
* `wp-content/mu-plugins/wpengine-common/admin-ui.php`
*/
// Simply hit this hook URL in your desired context:
$url = "https://api.wpengine.com/1.2/?method=file-permissions&account_name=" . $wpe_account_username . "&wpe_apikey=" . $wpe_api_key;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment