Skip to content

Instantly share code, notes, and snippets.

View deanoakley's full-sized avatar

Dean Oakley deanoakley

View GitHub Profile
@deanoakley
deanoakley / gist:77cad07f3afea4ab96fa6c1ea7c865d1
Last active December 4, 2023 05:25
wp cli - update all the things
# Update WordPress and enable auto updates
# Install and activate the Akismet plugin
wp plugin install akismet --activate
# Deactivate the 'disable-wordpress-updates' plugin
wp plugin deactivate disable-wordpress-updates
# Update all plugins
wp plugin update --all
@deanoakley
deanoakley / wp-disable-plugin-update.php
Last active March 22, 2024 09:30 — forked from rniswonger/wp-disable-plugin-update.php
WordPress - Disable specific plugin update check
/**
* Prevent update notification for plugin -
* http://www.thecreativedev.com/disable-updates-for-specific-plugin-in-wordpress/
* Add to the core plugin file
*/
function disable_plugin_updates( $value ) {
if ( isset($value) && is_object($value) ) {
$plugin_file_name = basename(__DIR__) . '/' . basename(__FILE__);
if ( isset( $value->response[$plugin_file_name] ) ) {
unset( $value->response[$plugin_file_name] );
@deanoakley
deanoakley / theme_overrides.php
Last active April 7, 2020 05:04
Easy theme overrides for when updates a site with a build process.
<?php
/**
* Easy theme overrides for when updating a site with a build process in WordPress
* @author Dean Oakley
* http://thriveweb.com.au
* Add overrides.css and overrides.js to your theme directory and edit away
*/
add_action("wp_enqueue_scripts", "theme_overrides", 20);
@deanoakley
deanoakley / whois.php
Created February 26, 2020 05:01
PHP code to get WHOIS information of a domain
<?php
/*************************************************************************
php easy :: whois lookup script
==========================================================================
Author: php easy code, www.phpeasycode.com
Web Site: http://www.phpeasycode.com
Contact: webmaster@phpeasycode.com
*************************************************************************/
$domain = $_GET['domain'];
@deanoakley
deanoakley / gist:f4bcfe047c9798b1e667223a7d5dd839
Last active January 9, 2024 06:11 — forked from Jinksi/gist:d9856f3a053ce7ff29e39d51d6941da0
Serverpilot disable display php errors server-wide
echo 'display_errors = false' | sudo tee --append /etc/php5.6-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php7.0-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php7.1-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php7.2-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php7.3-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php7.4-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php8.0-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php8.1-sp/php.ini &&
echo 'display_errors = false' | sudo tee --append /etc/php8.2-sp/php.ini &&
cat /etc/php5.6-sp/php.ini &&