Ohhh, So you got big Db because of your bit.ly api plugin customization.
Dude test & research your plugins not your main site, like create a testing place somewhere, so if something weird happens doesn’t affects your techie-buzz
I too was looking for plugin to automatically make short urls for each post & make it available below posts by php call function
Dude share me that plugin. I prefer stumble upon links
Yes, for development environment WordPress should always be in debug mode and with that you can clean up all minor warning and most important avoid all kinds of big errors that are not easy to spot.
Isn’t that the purpose of the $unique parameter in add_post_meta? Set it to true and it won’t add a new key or over-write the old one. The function returns false in that case so you know to use update_post_meta.
A post_id of 0 is perfectly valid and a logical way of storing default post meta values – the code that reads meta data will automatically get those default values when a new post is created (where a plug-in provides custom editing on the post editor).
If WP removed the ability to use post_id=0 I’d open a ticket to report a bug.
Ohhh, So you got big Db because of your bit.ly api plugin customization.
Dude test & research your plugins not your main site, like create a testing place somewhere, so if something weird happens doesn’t affects your techie-buzz
I too was looking for plugin to automatically make short urls for each post & make it available below posts by php call function
Dude share me that plugin. I prefer stumble upon links
Holy crap on a cracker! 10 million rows?
One more tip:
define('WP_DEBUG', true);
should be the best developer’s friendYes, for development environment WordPress should always be in debug mode and with that you can clean up all minor warning and most important avoid all kinds of big errors that are not easy to spot.
Good idea, you have reminded me to do that on my localhost installation.
Thank you for posting this. Though I have never encounter this, it will make me more careful in the future.
I’ve opened a ticket to prevent WordPress from inserting rows into wp_postmeta if post_id is 0.
This is a very interesting article. I’ve never run into this problem, but I still find it a great article and a really informative post. Thanks!
Isn’t that the purpose of the $unique parameter in add_post_meta? Set it to true and it won’t add a new key or over-write the old one. The function returns false in that case so you know to use update_post_meta.
A post_id of 0 is perfectly valid and a logical way of storing default post meta values – the code that reads meta data will automatically get those default values when a new post is created (where a plug-in provides custom editing on the post editor).
If WP removed the ability to use post_id=0 I’d open a ticket to report a bug.
WOW i guess it is the little thing that can become BIG problems. I am not a techie but I can see this bringing down a site.