why the posts queried from sql is more than those showed on the page?
Autosaves get stored with post_type=inherit and other objects such as menus are also stored in the posts table.
Autosaves get stored with post_type=inherit and other objects such as menus are also stored in the posts table.
This is one of the best use cases for WordPress Multisite. There are some plugins (like this one) that do this on a per-page or per-category basis, but I’ve never used them. Multisite has a lot of nice advantages (network-wide updates, user management, etc), along with some fun extra bugs (a lot of the recent … Read more
You can use wpdb class to query your custom data from MySQL. Depending on your implementation you would either use: global $wpdb object, if your custom data is in same database as WP itself new custom instance of wpdb class if you need to connect to different database for custom data
Adding a BTREE or HASH index shouldn’t break anything, and I imagine that is what you want. At worst you could end up with multiple indexes, or less than optimal ones, which might negatively effect performance. I assume that if you are going to do this you will be evaluating the change to see if … Read more
There is no code I know of to automatically partition databases like that based on their size, but if you want to use something to manually split your system across multiple databases, then HyperDB is one way to do that. http://wordpress.org/extend/plugins/hyperdb/
wpdb::_insert_replace_helper() will escape the data: return $this->query( $this->prepare( $sql, $data ) ); But still … the base64 encoded string looks odd. That should have been four separate parameters, I think.
You’re probably better off to use get_users which returns an array of <?php // get all users, regardless of roll. If you do need to restrict by // role you can use the `role` argument: get_users(array(‘role’ => ‘author’)); $uses = get_users(array(‘orderby’ => ‘nicename’)); foreach ($users as $user) { // do stuff with $user, will have … Read more
YARPP doesn’t do anything on uninstall. So you have to uninstall it then go remove the indexes manually from the DB. The index names should be prefixed with yarpp_. Very untested SQL follows: SHOW INDEXES ON wp_posts; DROP INDEX yarpp_title ON wp_posts; DROP INDEX yarpp_content ON wp_posts;
I have done SymmetricDS synchronization with various content management sites using the wildcard feature to pick up new tables created by custom components. For example, you can put a trigger on tables named ‘wp_*’ and it will sync any tables that match. You can read about Using Wildcards to Sync Tables for more detail. In … Read more
Fetching the data To fetch your posts, you’d utilize the HTTP_API, fetch_feed() or SimplePie. This completely depends on how and from where you’re going to get the XML. Here’s one answer about the HTTP API](https://wordpress.stackexchange.com/a/73659/385) and another one. Storing & maintaining the data The main problem will be that you need a storage location. Therefore … Read more