The popular open-source contract for web professionals by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: March 15th 2016
- Original post
| # CSV format: username, email, password | |
| export IFS=","; cat /path/to/test.csv | while read a b c; do wp user create $a $b --user_pass=$c --role=administrator; done |
| # Changed to use content-type flag instead of header: -H 'Content-Type: application/json' | |
| siege -c50 -t60S --content-type "application/json" 'http://domain.com/path/to/json.php POST {"ids": ["1","2","3"]}' |
| <?php | |
| // PHP memory limit for this site | |
| define( 'WP_MEMORY_LIMIT', '128M' ); | |
| define( 'WP_MAX_MEMORY_LIMIT', '256M' ); // Increase admin-side memory limit. | |
| // Database | |
| define( 'WP_ALLOW_REPAIR', true ); // Allow WordPress to automatically repair your database. | |
| define( 'DO_NOT_UPGRADE_GLOBAL_TABLES', true ); // Don't make database upgrades on global tables (like users) | |
| // Explicitely setting url |
| grep "HTTP/1.1\" 404" access.log | awk '{print $7 } ' | sort | uniq -c | sort -n |
| $ # If you're using Drush with MAMP and DevDesktop, you'll have to either change your bash profile or (my preference) specify the path to the correct instance of Drush. | |
| $ # This solves the "Command pm-update needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command" issue. | |
| $ /Applications/DevDesktop/drush/drush |
| ─────────▄──────────────▄──── | |
| ────────▌▒█───────────▄▀▒▌─── | |
| ────────▌▒▒▀▄───────▄▀▒▒▒▐─── | |
| ───────▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐─── | |
| ─────▄▄▀▒▒▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐─── | |
| ───▄▀▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▀██▀▒▌─── | |
| ──▐▒▒▒▄▄▄▒▒▒▒▒▒▒▒▒▒▒▒▒▀▄▒▒▌── | |
| ──▌▒▒▐▄█▀▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐── | |
| ─▐▒▒▒▒▒▒▒▒▒▒▒▌██▀▒▒▒▒▒▒▒▒▀▄▌─ | |
| ─▌▒▀▄██▄▒▒▒▒▒▒▒▒▒▒▒░░░░▒▒▒▒▌─ |
| # Siege attempts to recreate real traffic by using a CSV of urls to hit. | |
| # This allows you to remove requests for assets, if you're running a CDN. | |
| # | |
| # c = concurrent users | |
| # i = "like the internet would visit" | |
| # b = benchmark (no delay needed) | |
| # t = time | |
| # f = file with urls 1 per line | |
| siege -c100 -i -b -t120S -f urls.csv |
| Animals & Nature | |
| Art | |
| Celebrations | |
| Celebrities | |
| Comics & Cartoons | |
| Eating & Drinking | |
| Emoji & Expressions | |
| Fashion | |
| Gaming | |
| Kids & Family |
| # wordpress-seo provides ability to edit meta information and provides sitemap. | |
| # w3-total-cache provides advanced caching no matter the server technology available. | |
| # better-wp-security provides brute force protection and a number of WordPress enhancements. | |
| # google-analytics-for-wordpress provides robust Google Analytics integration through the Google API. | |
| # redirection detects 404s and 301s and allows admins to set up redirects in the WP admin. | |
| # ewww-image-optimizer provides automatic optimization of uploaded images with local libraries instead of cloud-based services. | |
| # backupwordpress simple backup solution that can store backups above web root. | |
| # relevanssi provides better site search using a local index. | |
| # cloudflare is the best. Free automatic CDN and security solution. | |
| # jarvis is a quick search for the WordPress admin. Indespensible. |