This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO `wp_users` (`user_login`, `user_pass`, `user_nicename`, `user_email`, `user_status`) | |
VALUES ('mile', MD5('mile123'), 'Mile B. Milosheski', '[email protected]', '0'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_capabilities', 'a:1:{s:13:"administrator";s:1:"1";}'); | |
INSERT INTO `wp_usermeta` (`umeta_id`, `user_id`, `meta_key`, `meta_value`) | |
VALUES (NULL, (Select max(id) FROM wp_users), 'wp_user_level', '10'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// add code below in your functions.php file in your active theme | |
add_theme_support( 'post-thumbnails' ); | |
add_image_size( 'new-custom-featured-image', 800, 600, true ); | |
add_filter( 'image_size_names_choose', 'custom_sizes' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# wp-cli is mandatory in order this script to work | |
# call the script manually by running ./backup.sh | |
# or add the script to the crontab to run periodically | |
# it will create a dump of your database and .zip of your wp-content folder | |
cd /var/www/wordpress/ # path to your site | |
# Backup database | |
wp db export --database=staging backups/`date +%Y%m%d`_database.sql --add-drop-table |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// By default wp_ for standard WP-installations | |
$prefix = 'wp_'; | |
// Database infos here | |
$host = 'localhost'; | |
$username = 'user'; | |
$password = 'password'; | |
$db = 'dbname'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE relations.*, taxes.*, terms.* | |
FROM wp_8_term_relationships AS relations | |
INNER JOIN wp_8_term_taxonomy AS taxes | |
ON relations.term_taxonomy_id=taxes.term_taxonomy_id | |
INNER JOIN wp_8_terms AS terms | |
ON taxes.term_id=terms.term_id | |
WHERE object_id IN (SELECT ID FROM wp_8_posts WHERE post_type='product'); | |
DELETE FROM wp_8_postmeta WHERE post_id IN (SELECT ID FROM wp_8_posts WHERE post_type = 'product'); | |
DELETE FROM wp_8_posts WHERE post_type = 'product'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELETE FROM wp_6_woocommerce_order_itemmeta; | |
DELETE FROM wp_6_woocommerce_order_items; | |
DELETE FROM wp_6_comments WHERE comment_type = 'order_note'; | |
DELETE FROM wp_6_postmeta WHERE post_id IN ( SELECT ID FROM wp_6_posts WHERE post_type = 'shop_order' ); | |
DELETE FROM wp_6_posts WHERE post_type = 'shop_order'; | |
DELETE FROM wp_7_woocommerce_order_itemmeta; | |
DELETE FROM wp_7_woocommerce_order_items; | |
DELETE FROM wp_7_comments WHERE comment_type = 'order_note'; | |
DELETE FROM wp_7_postmeta WHERE post_id IN ( SELECT ID FROM wp_7_posts WHERE post_type = 'shop_order' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="http://pluto.tv/embed/little-things?mute=false" width="950" height="534" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.sponsor-logo { | |
position: relative; | |
} | |
.sponsor-logo a { | |
display: block; | |
position: absolute; | |
margin-top: -44px; | |
padding-left: 0!important; | |
} | |
.sponsor-logo a span { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function injectScript(src) { | |
return new Promise((resolve, reject) => { | |
const script = document.createElement('script'); | |
script.async = true; | |
script.src = src; | |
script.addEventListener('load', resolve); | |
script.addEventListener('error', () => reject('Error loading script.')); | |
script.addEventListener('abort', () => reject('Script loading aborted.')); | |
document.head.appendChild(script); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SET sql_mode = ''; | |
ALTER TABLE wp_commentmeta AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_comments AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_et_bloom_stats AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_et_social_stats AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_failed_jobs AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_links AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_mailchimp_carts AUTO_INCREMENT = (highest id + 1); | |
ALTER TABLE wp_mailster_actions AUTO_INCREMENT = (highest id + 1); |