How to delete posts in WordPress older than for example date 8.8.2009 ?
Go to MySQL PHPMyAdmin and type this in SQL area :
DELETE FROM wp_posts WHERE post_date < ’2009-08-08′
Job Done !
Freelancer jobs offer, job advice, freelance tips, employment advice. Find programmers jobs, software development jobs, freelance writer jobs, projects jobs for work from home.
How to delete posts in WordPress older than for example date 8.8.2009 ?
Go to MySQL PHPMyAdmin and type this in SQL area :
DELETE FROM wp_posts WHERE post_date < ’2009-08-08′
Job Done !
# You guessed it: the first thing to do is log in to your phpMyAdmin and select your WordPress database.
# Click the “SQL” button to open the SQL command window. In order to change your WordPress URL, execute this first command:
view plaincopy to clipboardprint?
UPDATE wp_options SET option_value = replace(option_value, ‘http://www.oldsite.com’, ‘http://www.newsite.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’;
# Then, we have to replace the relative URL (guid) of each post. The following command will do that job:
view plaincopy to clipboardprint?
UPDATE wp_posts SET guid = replace(guid, ‘http://www.oldsite.com’,'http://www.newsite.com’);
# We’re almost done. The last thing to do is a search and replace in the wp_posts table to make sure that no absolute URL is still here:
UPDATE wp_posts SET post_content = replace(post_content, ‘http://www.oldsite.com’, ‘http://www.newsite.com’);
If you forgot admin password and you didn’t put mail for rest password – only SQL can help you.
For this example : admin is your username and password is your new password.
# Log in to your phpMyAdmin, select your WordPress database and open the SQL window.
# Insert the following command (assuming your username is “admin”):
SET `user_pass` = MD5(‘PASSWORD’) WHERE `wp_users`.`user_login` =`admin` LIMIT 1;
PASSWORD – new password you want to have.
How to Change the Post Attribution at WordPress – The solution. Modifying author attribution on each post takes a lot of time. Happily, SQL can help you get things done:
1. Log in to your phpMyAdmin and select your WordPress database.
2. First, we have to get the right user IDs. To do so, open the SQL command window and execute the following command:
SELECT ID, display_name FROM wp_users;
UPDATE wp_posts SET post_author=NEW_AUTHOR_ID WHERE post_author=OLD_AUTHOR_ID;
Job is done !
If you see that you have several thousands comments for moderation you must use SQL to fix problem.
The solution. SQL tip :
1. Log in to phpMyAdmin and select your WordPress database.
2. Click the “SQL” button. Paste the following code in the SQL command window:
DELETE from wp_comments WHERE comment_approved = ’0′;
Job is done !
Post revision take a lot of memory. User can delete them in a second. If you have big website you will improve website speed and mysql database overload.
# Log in to phpMyAdmin and select your WordPress database.
# Click the “SQL” button. Paste the following code in the SQL command window:
1. DELETE FROM wp_posts WHERE post_type = “revision”;
This is it !
My name is Igor. Global economic crisis, that began that year, gave us a lot of problems. Freelancers must choose clients carefully now and this blog will help them. Here, everything is free - programmers can promote their skills for free giving comments, employers offer jobs for free. If you want you can join me at Stumbleupon or Twitter or Digg. or Facebook