Skip to content

Instantly share code, notes, and snippets.

@Inggo-inHomePortal
Inggo-inHomePortal / cleanup.sql
Created August 19, 2016 07:28
wp_options cleanup
DELETE FROM `wp_options` WHERE option_name IN (
'userpro_activity',
'wpmandrill-stats',
'_transient_RCWFeed_Ms_b22d9dad80577a8e66a230777d91cc6e',
'userpro_cached_results',
'userpro_fields_groups_default',
'userpro_fields_groups',
'era_googleFonts',
'suppamenu_skin_redow',
'suppamenu_skin_ubuntus',
@Inggo-inHomePortal
Inggo-inHomePortal / blink.css
Created April 6, 2016 04:27
Blink Keyframes
1. ssh to singapore-inhomeglobal.pagelydev.com
2. navigate to target site (e.g. test.inhomeok.com)
3. command: wp duplicate site <NewSiteName> --url=<source tenant site >(e.g. s13008.p240.sites.pressdns.com/example --admin='<AdminEmail>' --blogname='<New Site Name>'
Example: wp duplicate site inhomeportal --url=dev.inhomeok.com/freedom --admin='inggo.espinosa@inhomeportal.com' --blogname='inHomePortal'
4. Copy and execute the command displayed to clone the data as well.
@Inggo-inHomePortal
Inggo-inHomePortal / get-wp-admins.sql
Created October 26, 2015 03:21
Get all WordPress admins via MySQL
SELECT * FROM `wp_usermeta` LEFT JOIN `wp_users` ON `wp_usermeta`.`user_id` = `wp_users`.`ID` WHERE `meta_key` = 'wp_capabilities' AND `meta_value` LIKE '%administrator%'
@Inggo-inHomePortal
Inggo-inHomePortal / gist:918b60c820e5b5c0df0f
Created October 7, 2015 03:23
Pagely Sync Commands on Staging
cd ~/sites/staging.inhomeok.com/
pagely sync /data/s240102/dom11930/dom11930 /data/s240102/dom11931/dom11931
wp search-replace --url=production.inhomeok.com 'production.inhomeok.com' 'staging.inhomeok.com' --network
wp plugin deactivate --network domain-mapping
rsync -azP inggo@singapore-inhomeglobal.pagelydev.com:~/sites/dev.inhomeok.com/wp-content/uploads .