Skip to content

Instantly share code, notes, and snippets.


Andrei Chira fasterwp

View GitHub Profile
fasterwp / create-wp-admin-account.sql
Last active Aug 16, 2021 — forked from azizur/create-wp-admin-account.sql
Create a WordPress Administrator user account using SQL
View create-wp-admin-account.sql
SET @username = 'simplenet';
SET @password = MD5('password');
SET @fullname = 'Simplenet Suport';
SET @email = '';
SET @url = '';
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_url`, `user_registered`, `user_status`, `display_name`) VALUES (@username, @password, @fullname, @email, @url, NOW(), '0', @fullname);
SET @userid = LAST_INSERT_ID();
INSERT INTO `wp_usermeta` (`user_id`, `meta_key`, `meta_value`) VALUES (@userid, 'wp_capabilities', 'a:1:{s:13:"administrator";b:1;}');
fasterwp /
Created Apr 22, 2020 — forked from neverything/
Sometimes you only want the original images and not the generated sizes <name-of-image>-150x150.png. This command deletes all the files with a certain pattern in the file name.
# List the files
find -E . -type f -regex ".*-[[:digit:]]{2,4}x[[:digit:]]{2,4}(@2x)?.(jpg|jpeg|png|eps|gif)"
# DANGER! Delete the files
find -E . -type f -regex ".*-[[:digit:]]{2,4}x[[:digit:]]{2,4}(@2x)?.(jpg|jpeg|png|eps|gif)" -delete
fasterwp / hide-plugins-if-not-ID.php
Created Sep 2, 2021 — forked from wpmudev-sls/hide-plugins-if-not-ID.php
Hides specific menus from any users if they don't have the given ID
View hide-plugins-if-not-ID.php
* Plugin Name: Hide Plugins
* Plugin URI:
* Description: Hides specific plugins from Admin Menus & Plugins List
* Version: 1.0.0
* Author: Konstantinos Xenos @ WPMUDEV
* Author URI:
* License: GPLv2 or later