1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to make your blog look fresh, new and recently updated

Discussion in 'Blogging' started by blackhit, Aug 15, 2009.

  1. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    This is especially useful for reviewblogs.
    Before I go into this I'd like to thank BHW member cyklotrial for providing me with the code for this idea.

    A lot of people search the Net looking for a review or a detailed description of a product before they buy.
    I have a lot of reviewblogs and what I saw, not surprisingly, is that the older the blogs and the posts the greater the bounce rate on the homepage.
    People are looking for fresh reviews about the latest model or the latest revision.
    I know I do.
    A product might be around for some time but when it still gets raving recent reviews it must be good.

    Now you could go into your blogs once in a while and update the dates on the posts and the comments.
    Will take you a while if you have 200+ blogs!!!!

    So here's a step by step to do it all on autopilot.

    TEST THIS 1ST ON A TESTBLOG JUST IN CASE YOUR HOSTING HAS SOME STRANGE SERVER SETTINGS

    Step 1 - Make a backup of your Wordpress database

    Step 2 - Open this script in notepad and insert your MYSQL database, user and password where it says so

    PHP:
    <?php
    function change_date($date1)
        {
        
    $date2=strtotime($date1) + (60 60 24);
        return 
    date("Y-m-d H:i:s",$date2);
        }

    $dbuser="INSERT YOUR MYSQL USER NAME HERE";
    $dbpass="INSERT YOUR MYSQL USER PASSWORD HERE";
    $dbname="INSERT YOUR MYSQL DATABASE NAME HERE";
    $handle mysql_connect("localhost"$dbuser$dbpass
        or die(
    "Connection Failure to Database");
    //echo "Connected to database server<br>";
    mysql_select_db($dbname$handle) or die ($dbname " Database not found." $dbuser);
    //echo "Database " .  $database . " is selected<br><br>";

    $query "SELECT * FROM `wp_posts`";
    $run_query mysql_query($query);

    while (
    $row mysql_fetch_row($run_query))
        {
        
    $new_date1=change_date($row[2]);
        
    $new_date2=change_date($row[3]);
        
        
    $query "UPDATE wp_posts SET post_date='$new_date1', post_date_gmt='$new_date2' WHERE ID='$row[0]'";
        
        
    mysql_query($query )or die("Error");
        } 

    $query "SELECT * FROM `wp_comments`";
    $run_query mysql_query($query);

    while (
    $row mysql_fetch_row($run_query))
        {
        
    $new_date1=change_date($row[6]);
        
    $new_date2=change_date($row[7]);
        
        
    $query "UPDATE wp_comments SET comment_date='$new_date1', comment_date_gmt='$new_date2' WHERE comment_ID='$row[0]'";
        
        
    mysql_query($query )or die("Error");
        } 

    mysql_close($handle);
    ?>
    Step 3 - Save the file with any name you like and upload it to your Wordpress directory.

    Step 4 - Make a cronjob to execute this script

    This script will increase the date for posts and comments in the blogs MYSQL database with a value of your choice.

    Lets say someone comes to your blog and sees a post that's 4 days old. Looking good, a fresh review!!!!
    You set the script to add 1 day and you run the cronjob every day at midnight.
    The next day another visitor comes to your blog and sees the same post and it's still 4 days old.
    This post will never age.....

    This part of the script on line 4 controls the number of days that is added to the postdate.

    $date2=strtotime($date1) + (60 * 60 * 24);

    The 3rd number, in this example 24, states the hours that you want to add. So here it adds 24 hours = 1 day.

    On my blogs I want most of the returning visitors in the next couple of days to see the same date as on their 1st visit.
    So I update the dates once a week.
    I run the cronjob once a week and set the hours to 168
    $date2=strtotime($date1) + (60 * 60 * 168);
     
    • Thanks Thanks x 8
    Last edited: Aug 15, 2009
  2. keinehabe

    keinehabe Supreme Member

    Joined:
    Nov 4, 2008
    Messages:
    1,207
    Likes Received:
    472
    Gender:
    Male
    Occupation:
    -= CEO =-
    Location:
    Heaven
    Home Page:
    genius :) what I can say :) was looking like 20 hours ago about such auto-mode :) was even asked a friend about some tricks how to do it with imacros lol . you saved my life !
     
  3. Vbp6us

    Vbp6us Newbie

    Joined:
    Jul 24, 2009
    Messages:
    30
    Likes Received:
    1
    Location:
    Windsor
    Wow this seems like something I need for my newly setup autoblog. I don't have 200 posts yet but I can see it getting there fast. I wondered if this would be a good idea instead of adding content all the time and in fact, I've been doing this by hand (in this little time I've had my AB) on 20+ posts. :eek:

    Thanks for the share!
     
  4. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    With review-style blogs dedicated to one product or

    1 long-tail-keyword you have your intro, some basic info

    and as the climax-post your pre-sell.

    Intro and basic info build up to the pre-sell.

    After the pre-sell there's nothing left to say.....except for some fake comments.
     
  5. jmascis

    jmascis Registered Member

    Joined:
    Feb 11, 2009
    Messages:
    71
    Likes Received:
    17
    Do you think this will help your SERPs too? I've noticed that when I've gone back and updated a review with more information, my ranking went up.
     
  6. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    No, this will not influence your SERPS.

    The change is directly in the database and not in the post.
    So there's no ping.

    Fresh content is always good but when you blow away the competition based on keywords, backlinks etc. you'll still remain high in the SERPS even if the content is old in the eyes of the search engines.
     
  7. BadArticle

    BadArticle Junior Member

    Joined:
    Aug 10, 2009
    Messages:
    100
    Likes Received:
    29
    Home Page:
    It just make the post data change itself and up to date, but it cannot make Google index more or fast
     
  8. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    Correct.

    This trick is only for your visitors who will think they have landed on a blog with fresh content looking at the posting and comment dates.

    Doesn't add any value to your indexing or ranking.
     
  9. spydj

    spydj Registered Member

    Joined:
    Apr 25, 2009
    Messages:
    54
    Likes Received:
    9
    Could this also somehow be used in the other way to make people think the blog is allready some months/years old?

    I know making it look like its new is good, but sometimes i would need to make people think they are on a blog that is around for long time.
     
  10. gundamwing

    gundamwing Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 18, 2008
    Messages:
    1,274
    Likes Received:
    913
    its only for
    increase the date

    but same post why dont remove the time php
     
  11. spydj

    spydj Registered Member

    Joined:
    Apr 25, 2009
    Messages:
    54
    Likes Received:
    9
    yes i understood that its only to increase the date, but i was asking IF it is possibl to modify it somehow that it decreases the date?
     
  12. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    There are other ways but it can be done with this script.

    On line 4 change the + into a -

    $date2=strtotime($date1) + (60 * 60 * 24);

    becomes

    $date2=strtotime($date1) - (60 * 60 * 24);


    Just don't let it age 1 month everyday and forget about it......you'll end up with a blog that started on Jan. 1st 1970.........:D
     
    • Thanks Thanks x 1
    Last edited: Aug 15, 2009
  13. blackhit

    blackhit Super Moderator Staff Member Jr. VIP Premium Member

    Joined:
    Jan 28, 2008
    Messages:
    2,402
    Likes Received:
    4,251
    Location:
    Dark Side Of The Moon
    It depends on what impression you want to give with the blog.
    And it depends on the product you're promoting.

    If you want to make it timeless just edit to remove any timestamp.
     
  14. finerpleasures

    finerpleasures Regular Member

    Joined:
    Feb 17, 2009
    Messages:
    322
    Likes Received:
    97
    Off the hook
     
  15. spydj

    spydj Registered Member

    Joined:
    Apr 25, 2009
    Messages:
    54
    Likes Received:
    9
    Thanks a lot man!
     
  16. nianain

    nianain Junior Member

    Joined:
    Jun 15, 2009
    Messages:
    176
    Likes Received:
    64
    Location:
    US
    great share.

    couldn't you pull this off using some PHP tricks? that way you wouldn't have to mess with your sql db and making a new cron? something like:

    Code:
    $twodaysago = date("d") -2
    I know that is wrong, any PHP head please correct.