This file contains 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_usermeta | |
WHERE NOT EXISTS ( | |
SELECT * FROM wp_users | |
WHERE wp_usermeta.user_id = wp_users.ID | |
) |
This file contains 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_commentmeta | |
WHERE comment_id NOT IN ( | |
SELECT comment_id FROM wp_comments | |
); |
This file contains 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_postmeta | |
WHERE post_id NOT IN ( | |
SELECT ID FROM wp_posts | |
); |
This file contains 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
# To recursively give directories read & execute privileges | |
chmod 755 $(find /path/to/base/dir -type d) | |
# To recursively give files read privileges | |
chmod 644 $(find /path/to/base/dir -type f) |
This file contains 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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
This file contains 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
# First create a dump of your MySQL database | |
mysqldump -u [user] -p database_name > database_name.sql | |
# Convert the data | |
iconv -f iso-8859-15 -t utf8 database_name.sql > database_name_iconv.sql | |
# Import the database | |
mysql -u [user] -p database_name < database_name_iconv.sql | |
# If you still have some specific characters that do not display |
This file contains 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( 'user_register', 'add_user_to_sendy_list' ); | |
function add_user_to_sendy_list( $user_id ) { | |
$list = 'SENDY_LIST_ID'; | |
$url = 'http://SENDY_INSTALL_URL/subscribe'; | |
$user = get_userdata( $user_id ); | |
$email = $user->data->user_email; | |
$name = $user->data->user_nicename; |