Skip to content

Instantly share code, notes, and snippets.

View joetek's full-sized avatar

Joe Taiabjee joetek

  • Joetek
  • Toronto, ON
View GitHub Profile
# su as root
yum -y update
yum -y install httpd24
yum -y install php70
yum -y install php70-gd
yum -y install php70-imap
yum -y install php70-mbstring
yum -y install php70-mysqlnd
yum -y install php70-opcache
# .htaccess to block load-scripts.php and load-styles.php if user is not logged in.
#
# For styles, it redirects to the login.css, which includes *most* of the styles needed for the login screen.
# For scripts, it simply denies access with a 403 Forbidden.
#
# This workaround may have trouble if you have customized the login screen. Add this code to the top
# of your .htaccess file.
#
<IfModule mod_rewrite.c>
Verifying that +joetek is my blockchain ID. https://onename.com/joetek
@joetek
joetek / WP_index_restore
Last active August 29, 2015 14:08
SQL to restore indexes in WordPress
ALTER TABLE wp_5_posts MODIFY COLUMN ID bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE wp_5_posts ADD KEY `post_name` (`post_name`);
ALTER TABLE wp_5_posts ADD KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`);
ALTER TABLE wp_5_posts ADD KEY `post_parent` (`post_parent`);
ALTER TABLE wp_5_posts ADD KEY `post_author` (`post_author`);
ALTER TABLE wp_5_postmeta MODIFY COLUMN meta_id bigint(20) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY;
ALTER TABLE wp_5_postmeta ADD KEY `post_id` (`post_id`);
ALTER TABLE wp_5_postmeta ADD KEY `meta_key` (`meta_key`);