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_action('admin_init','HR_user_lockout'); | |
function HR_user_lockout() { | |
global $current_user, $menu, $submenu; | |
$restricted_user = 1; | |
// check for current user | |
if ($current_user->data->ID == $restricted_user) { | |
// remove admin menus | |
$menu = array(); | |
$submenu = array(); |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-latest.js"></script> | |
<script type='text/javascript'> | |
$(document).ready(function() { | |
setInterval(function() { | |
var url = 'http://full_url_of_this_page.html'; | |
$('#refresh_zone-wrapper').load(url + ' #refresh_zone'); //note: space between intentional | |
}, 2000); // milliseconds |
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
mysqldump: Got error: 2005: Unknown MySQL server host | |
'external-db.s000000.gridserver.com' (0) when trying | |
to connect |
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
mysqldump -h external-db.s000000.gridserver.com --add-drop-table -u db000000_username -p db000000_database > ~/Sites/db000000.sql |
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
mysqldump: Got error: 2049: Connection using old (pre-4.1.1) | |
authentication protocol refused (client option 'secure_auth' | |
enabled) when trying to connect |
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 a,b,c FROM wp_posts a LEFT JOIN | |
wp_term_relationships b ON (a.ID = b.object_id) | |
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'; |
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
<? | |
global $wpdb; | |
$wpdb->query("DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'"); | |
?> |
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
<? | |
define('AUTOSAVE_INTERVAL', 300 ); | |
define('WP_POST_REVISIONS', false ); | |
?> |
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
define( 'DOMAIN_CURRENT_SITE', 'newname.com' ); |
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
rows: `siteurl`, `home` in: `wp_options` | |
rows: `domain` in: `wp_site` | |
row: `siteurl` in: `wp_sitemeta` | |
row: `home`, `site url` in every: `wp_*_options` | |
then | |
`UPDATE `wp_blogs` SET `domain`='newdomain.com'` |