Welcome To Snipplr


Everyone's Recent MySQL Snippets Tagged wordpress



« Prev 1 Next »
Select wp_users and wp_posts to retrieve data from both tables in order to display post title, post date, author name with gravatar (gravatar isn't listed in this code) Note: probably not idea solution, but it's one of many fixes
0 662 posted 12 years ago by ninacess
0 472 posted 12 years ago by pwd
If a MySQL DB for WordPress is encoded as latin1, these steps will prevent utf8 encoding issues.
0 710 posted 13 years ago by theriddlebrothers
If you run a query to delete old posts manually from MySQL in a WordPress database, the old tags will remain and appear in your tag cloud/listing. This allows you to identify those unused tags, and then delete them with an additional query.
0 526 posted 13 years ago by theriddlebrothers
This SQL query will find all the SlideDeck related entries in your WordPress database.
0 554 posted 13 years ago by Jamie
Execute this script to replace old links inside the content of Wordpress posts.
0 537 posted 13 years ago by jhonqwerty
SQL query to update *wp_options* records that are specific to the host of a WordPress site. Run this query after copying the DB to another server (if this URL is different). Useful for deploying WordPress from a dev server to a live environment.
1 596 posted 13 years ago by errkk
When working on client sites, you often need admin access, instead of requiring them to set up an admin user, just make your own. ref: http://www.dnawebagency.com/how-to-add-an-admin-user-to-the-wordpress-database
2 871 posted 13 years ago by timkinnane
If you\'ve got a Wordpress install that\'s changed domain or you\'re making a local or development copy, you\'ll need to update the Wordpress DB tables with the new URL.\r\nThe first step is the options table, with siteurl and homeurl. The posts als...
1 594 posted 13 years ago by timkinnane
Change \"wp\" to your database prefix. Note, this is the quick and dirty way. The more thorough way, which will also clean any tags or categories that are now unused, is here: http://www.snipplr.com/view/29570/get-rid-of-unused-post-revisions/
2 513 posted 13 years ago by jessibird
Just run the following query on your WordPress database, and all revisions (As well as meta associated with it) will be deleted from your database.
2 660 posted 14 years ago by jessibird
If the official codex approach (http://codex.wordpress.org/Changing_The_Site_URL) is causing you problems, give this a try. Be sure to change the constant declarations and modify table names as necessary for your instance. Confirmed working with WP v...
1 876 posted 14 years ago by johnandrewsroot
Just updated for WP 3 (added wp_postmeta table for menus)! Test out the new installation thoroughly but everything should be fine, and your CMS should be running live on the new server!
0 607 posted 14 years ago by beneberle
2 533 posted 14 years ago by atma
If you run a query to delete old posts manually from MySQL in a WordPress database, the old tags will remain and appear in your tag cloud/listing. This allows you to identify those unused tags, and then delete them with an additional query.
0 576 posted 14 years ago by jkriddle
This gets me every time. Why doesn't my blog work?! Oh yeah, that's why.
0 483 posted 15 years ago by jaspertandy
« Prev 1 Next »