amazingprod
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: disable post revisions and auto saveBTW, one of the reasons I posted the above message is because I read on some related threads that have been close, where some WordPress Developers don’t think that saving unlimited revisions can ever cause a problem.
Well in our case, it made our backups for the past couple of months incomplete–it’s a good thing we didn’t have to restore any of them.
Forum: Fixing WordPress
In reply to: disable post revisions and auto saveWe had problems backing up the MySQL database using phpMyAdmin because the database was too big and we were hitting some kind of limit or timeout with phpMyAdmin. The wordpress.sql file was stopping after 18.4 MBytes, so the backup flles incomplete.
wp-posts table was 24MB. It turns out a lot of the posts had 10 and 20 revisions. After we deleted all the revisions with DELETE FROM wp_posts WHERE post_type = “revision”; , wp-posts was 2.4 MB, so it was 10x the size.
Database can now be backed up via phpMydmin
Here’s the story.
https://www.lagunabeachbikini.com/index.php/2011/06/01/wordpress-how-to-disable-post-revisions/
I have another WordPress blog with almost the latest version. Is this still a problem? Could not find the code for WP_POST_REVISIONS in wp-settings.php
Forum: Fixing WordPress
In reply to: How To Get Random PostHere is something interesting.
I made the front page display a random post. Everytime the php runs, it loads a different post.
As a separate issue, I have been trying to speed up my wp site. So I installed W3 Total Cache.
Well since WPTC caches the front page, the first time it loads the new random page. But after that it gets the static html page which doesn’t change. If I set Maximum Lifetime of Cache Objects to 3600 seconds, I think I will get a new random front page every hour. If I set it to 21600 seconds, every 6 hours. Ot I could make it eery 24 hours.
So I can get the random page to stick around an arbitrary length of time as a side effect of speeding up the website. Sweet!
Forum: Fixing WordPress
In reply to: How To Get Random PostI think for now I will just go with the random post every time the front page is loaded and see how that works out.
Maybe it makes the website more interesting to have a different post displayed each time. Kind of like a random jukebox of posts. Here is the site if anyone has any comments or suggestions:
Forum: Fixing WordPress
In reply to: How To Get Random PostAnother thing I would like to be able to do is get the latest post from certain categories, rather than the 10 latest posts from certain categories. In other words, the latest post from each of 10 categories, only one post per category.
Forum: Fixing WordPress
In reply to: How To Get Random PostI had a php website once with “Quote of the Day”. There was a text file with a bunch of quotes, one per line. Every day at midnight a job would start up that wrote a random number to a file. Whenever a page was accessed the file was read to see which quote should be used.
Is there any way to do that with wordpress? Have it read a file or something to get the random number for today and then somehow use that to to pick the post to display.
Or maybe I could use today’s date to index the into the list of posts or something like that? That way it would change when the date changed, at midnight.
I am not an expert programmer. I can only make minor modifcations to the php files.
Forum: Fixing WordPress
In reply to: How To Get Random PostThanks
<?php query_posts('orderby=rand&showposts=1&cat=75,76,77'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
This seems to work. How can I get the post to stick around all day. In other words, whichever post is selected, that is the post for the entire day.
Forum: Fixing WordPress
In reply to: How to make Front Page Display Only One Category?OK, thanks. That worked.
I a running WordPress 2.3.2 with prosumer-10 theme
I edited index.php in directory
wordpress/wp-content/themes/prosumer-10ORIGINAL index.php
<?php get_header(); ?> <div id="content"> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
NEW index.php
<?php get_header(); ?> <div id="content"> <?php query_posts('showposts=20&cat=3'); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?>
Thanks