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
#!/bin/sh | |
wget https://xdebug.org/files/xdebug-2.5.5.tgz | |
tar xvzf xdebug-2.5.5.tgz | |
cd xdebug-2.5.5 | |
phpize | |
./configure | |
make | |
sudo cp modules/xdebug.so /usr/lib/php/20160303/ | |
cd /etc/php/7.2/fpm/conf.d/ |
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
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
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_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
-- Select users in WordPress without specific user meta key | |
-- * Replace meta_name for your meta key | |
-- * Replace > 0 for the minimum user ID | |
SELECT wp_users.ID | |
FROM wp_users | |
WHERE wp_users.ID > 0 | |
AND wp_users.ID NOT IN ( | |
SELECT DISTINCT user_id FROM wp_usermeta WHERE meta_key = 'meta_name' | |
) |
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
find . -name '*.DS_Store' -type f -delete |