Introduction

This site is designed to help T1 and T1Es have information at their fingertips for when to remember that hard to recall command.

While this is aimed specifically for fellow employees at InMotion Hosting, much of this information would be useful regardless of where you worked. However no guarantee is assumed based.

Have a One Liner that should be here? Hit up Chris Mo on Slack!

WordPress Commands

Force re-install of all WP Plugins:
wp plugin install $(wp plugin list --field=name) --force

Force re-install of all WP Themes:
wp theme install $(wp theme list --field=name) --force

Change WP user role:
wp user set-role id <new role>

Force WP user to have new pw:
wp user update id --user_pass=password

Have WP restore default user roles:
wp role reset --all

Get list of WP Plugins that are active setting PHP memory:
activelist=$(php -d memory_limit=512M $(which wp) option get active_plugins --format=json)

Restore WP Plugins to activelist:
php -d memory_limit=512M $(which wp) option set active_plugins $activelist --format=json

Turn off plugins one at a time with 30 second window:
for i in `wp plugin list --status=active | awk '{if(NR>1)print $1}'`; do wp plugin deactivate $i && echo -e "[-] Deactivating plugin $i and sleeping for 30 seconds, try refreshing Cx's website to test if the website is up" && sleep 30 && echo "[+] Reactivating the plugin" && wp plugin activate $i; done

Nameserver IPs:

IMH

ns1.inmotionhosting.com: 74.124.210.242
ns2.inmotionhosting.com: 70.39.150.2

ServConfig

ns1.servconfig.com: 216.194.168.112
ns2.servconfig.com: 70.39.146.236

WHH

ns1.webhostinghub.com: 209.182.197.185
ns2.webhostinghub.com: 173.205.127.4

Email Filters

Sometimes you find that cPanel seems to be filtering emails for no easily seen reason, check out the following path for the user: /home/cpaneluser/etc/domain.com/username/filter.xzy

PHPMyAdmin

Increase upload size in PHPMYADMIN on VPS or higher cPanel server requires T1E+

  1. Login to WHM as root.
  2. Go to Server Configuration » Tweak Settings.
  3. Click on PHP tab.
  4. Update the values max upload size and max POST size to the max file size you need.

(Max: 300MiB)

WHM / cPanel one liners

Create WHM user login: whmapi1 create_user_session user=<user name> service=whostmgrd locale=en

Unsuspend email: whmapi1 unsuspend_outgoing_email user=<user>

Install New service SSL: /usr/local/cpanel/bin/checkallsslcerts --allow-retry --verbose

Modify Ownership of one account: modify-account $user -o OWNERNAME

Modify Ownership of everyone on a reseller/vps: for user in $(\ls /var/cpanel/users -I 'system');do modify-account $user -o OWNERUSERCHANGETHIS; done