Skip to content

Instantly share code, notes, and snippets.

@maheshwaghmare
Created December 6, 2019 06:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maheshwaghmare/cd63501be5ace84dfc9497dea89ceb5f to your computer and use it in GitHub Desktop.
Save maheshwaghmare/cd63501be5ace84dfc9497dea89ceb5f to your computer and use it in GitHub Desktop.
Test website performance by deactivating the single plugin.
for id in $(wp plugin list --fields=name --status=active --format=csv); do
echo $id;
wp plugin deactivate $id;
curl -s -o /dev/null -w "%{time_total}\n" http://localhost/dev.new/;
curl -s -o /dev/null -w "%{time_total}\n" http://localhost/dev.new/;
curl -s -o /dev/null -w "%{time_total}\n" http://localhost/dev.new/;
curl -s -o /dev/null -w "%{time_total}\n" http://localhost/dev.new/;
curl -s -o /dev/null -w "%{time_total}\n" http://localhost/dev.new/;
wp plugin activate $id;
done
@maheshwaghmare
Copy link
Author

test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment