WordPress stores user generated content, along with other configurable information, in a a database (typically MySQL).
3
votes
3answers
5k views
insert data in database table from plugin with WP3.1
I am quite new in WP Plugin World. I am trying to develop a plugin in WP 3.1 when I am trying to insert data into my table named "wp_enam" in the following way:
$wpdb->insert($wpdb->enam, ...
3
votes
2answers
362 views
How To Export/Import WordPress (MySQL) Database Properly Via Command-Line?
Normally, a MySQL database can be exported and imported using these simple SSH commands:
Export:
mysqldump -u USERNAME -p PASSWORD DATABASE_NAME > filename.sql
Import:
mysql -u USERNAME -p ...
3
votes
2answers
2k views
Transient RSS feeds in wp_options not removed automatically?
I just noticed 55.000 entries(!) in my wp_options table. I had not been there for a while.
So I ran:
delete from `wp_options` where `option_name` like '_transient_timeout_rss%'
delete from ...
3
votes
1answer
96 views
what is the wp_5_posts table in the database?
I'm wondering what all the wp_2_*, wp_3_*, wp_4_*, and wp_5_* tables are in the database. Does anyone know what they are? Some of them in my example are from plugins, but what does the wp_# prefix ...
3
votes
2answers
904 views
Is it a bad practice to go directly to the mysql database while developing a plugin?
This is a sample of the Vote it Up plugin:
//Run this to create an entry for a post in the voting system. Will check if the post exists. If it doesn't, it will create an entry.
function ...
3
votes
1answer
365 views
$wpdb->prepare() warning in WordPress 3.5
I am receiving this warning when I try to run a database query:
Warning: Missing argument 2 for wpdb::prepare()
The offending query is:
$result = $wpdb->get_var(
$wpdb->prepare(
...
3
votes
2answers
1k views
Displaying content from one WP site on separate WP site
I have two totally separate WP websites setup. Different domains, different databases. I manage both of them and they are both hosted on a dedicated server. I am trying to include some basic ...
3
votes
1answer
44 views
Where can I find the database changes between WordPress versions?
Given vX and vX+1, how do I find the difference between each versions database schema?
3
votes
2answers
455 views
How to change option recently_edited?
WP recently_edited option can be very useful - it tracks last 5 files that you've made changes to. Only problem is - well, that's all, 5 files.
What if I've been made numerous changes to Wordpress ...
3
votes
1answer
386 views
Default Wordpress settings API data sanitization
It looks to me that when saving data to the database via the settings API Wordpress sanitizes data by default. By that I mean that if I look at the raw settings options in the database they have (at ...
3
votes
1answer
2k views
how do I determine which image is the featured image in the database
I've queried all children of the post, and two records are shown. This is ok because there are 2 images in the gallery, but I can see no field in the database which makes it clear which one is the ...
3
votes
2answers
397 views
Custom Post Type with Input fields to seperate table on database.
At the moment I'm using a custom post type called 'locations' I would like to be able to put input fields into the custom post type that would store the information such as ( address, type, phone ...
3
votes
2answers
461 views
where is permalink info stored in database?
I see that I can edit permalink information in wp-admin page > settings > permalinks. However, where is that information actually stored in the database?
3
votes
2answers
153 views
Sharing database for collaborative development
Is there a straightforward way to share/sync multiple WP instances with a single database? I work collaboratively with several developers on custom themed sites. We use git to keep our files in order ...
3
votes
3answers
80 views
How many users can WordPress handle?
I want to design a member login site in WP but I have a doubt that is WordPress can handle more than 40000 users on same database?
I am not sure about this so I am stooping my work here. So please ...
3
votes
1answer
129 views
How is custom menu hierarchy output handled?
I'm looking to pass custom nav_menus through an RSS feed so I can grab them on other sites to create the same custom menu on multiple sites.
What I can't figure out by looking through the database is ...
3
votes
2answers
3k views
How to get the post publish date outside the loop?
I need to pull out the post publish date in order to make the post post auto expire. The thing is I can't get the right publish date.
Here is my code:
global $wpdb;
$post_ids = ...
3
votes
1answer
167 views
What is the advantage of separating wp_users and wp_usermeta table?
I want to know why Wordpress designed their database with two tables separating users and meta from each other. Wouldn't it be better if first_name, last_name, nickname, description, and capabilities ...
3
votes
2answers
83 views
Wordpress will not operate correctly
My website is ImASpy.com. If you click on the link, Findings, this takes you to my first Wordpress page. It appears to work fine until you click on comments, or you try to go to the about page, which ...
3
votes
1answer
651 views
importing data from non-wordpress mysql db
I have created an import file to get the articles from a non-wordpress db and bring them in as posts in wordpress, I am not sure how to bring over the thumbnail image into my custom field I defined as ...
3
votes
1answer
179 views
Custom post type or just use custom fields
I am turning a restaurants website into a wordpress website to allow for the customer to take over content changes. The restaurant has a menu that has categories like Baskets with different types. For ...
3
votes
1answer
246 views
Wordpress admin never finishes saving page on site with large page count
I have a Wordpress install with a very large amount of pages (a few hundred thousand), and over time it has gotten to the point where editing a page takes an extremely long amount of time. It would ...
3
votes
1answer
143 views
Showing content from another wordpress installation database in the page template loop?
I am just wondering if it is possible to show just the page content of another wordpress database on wordpress pages with the same pageID within the content loop in my page template. To be more ...
3
votes
1answer
250 views
WordPress use innodb by default?
I just created a new WordPress site in my server. Normally, WordPress uses MyISAM as the database type. But this time, it created all InnoDB tables! Is this normal? Has WordPress switched to InnoDB in ...
3
votes
1answer
679 views
How to convert regular categories to custom taxonomy?
I have a big list of categories/subcategories (around 60 in all). It now makes sense that instead of these categories being available to any post type's category list, these categories should be moved ...
3
votes
1answer
751 views
Not sure the best way to save custom plugin data
Doing my first plugin with 3.1 Everything is great, but I need to store the data now. My data is sufficiently complex that it requires custom tables (as opposed to options). So now I am wondering ...
3
votes
3answers
1k views
Moving Wordpress to new server: no posts found
I have a weird problem with moving a Wordpress installation to a new server (just the server changes, domain remains the same, I'm currently accessing the site on the new server via the same domain ...
3
votes
0answers
137 views
How to use custom database tables for custom post types?
I need to use an existing database table as a Custom Post Type (CPT) to integrate it with wordpress.
I've considered @boone-gorges thoughts here (should I?) and have decided, Yes, I need to use a ...
3
votes
2answers
705 views
Special characters in WordPress UTF-8 [closed]
I have a problem regarding special characters that are appearing messed up on the front-end .
mainly the get converted to question marks, or something like �?)
Example - Frédèric becomes Fr�d�ric.
...
2
votes
4answers
297 views
Long option names fail silently?
This was really driving me crazy. I was debugging some code with code-generated transient names and they were failing like crazy for no apparent reason.
After much much pain and experimentation I ...
2
votes
3answers
923 views
Creating two database tables via plugin
I'm working on a voting plugin for my site and I want to create 2 tables: one that stores votes and another that stores voter ips.
In Codex it suggests to use an if statement to see if the table has ...
2
votes
1answer
54 views
prefix table and plugins
I changed my prefix of my tables from the wp_ to something else for security reasons and good practice etc. I was curious most of new plugins installed take on the new prefix but I have one that ...
2
votes
2answers
709 views
Migrating data between local and development server
I've been working away at a medium-size WordPress site. So far I've just been hosting the site on my local machine and showing it to internal consultants over our local network. Things are working ...
2
votes
2answers
280 views
Display data from a non wordpress database on a page template
I am using a sql query to access information to display on a wordpress page by adding the below code to a page template. I know the query works as I've tested it in phpmyadmin.
$rows = ...
2
votes
2answers
419 views
Using transients in conjunction with memcached
I was hoping someone could clear the air for me when it comes to using transients with memcached.
When running a plugin like w3-total-cache, are there any actual performance advantages to using ...
2
votes
1answer
167 views
Taking WordPress table prefixes into account
Given the code below how would I account for the table prefix that can change from installation to installation? Is there a better way to write it than an SQL query? Is there a variable I've missed ...
2
votes
3answers
1k views
How do I show data from gravity forms in my template?
Preface
I've installed gravity forms, created a form and users are submitting data to my site.
What I want to do is show the data users are submitting to my site on one of my pages.
I know there's ...
2
votes
1answer
41 views
Text snippets shared across posts
I'd like to add a "fast facts" section to a wordpress site - an area in the sidebar where snippets of text are rotated.
Where is the best place to store things like this? Widgets don't really allow ...
2
votes
2answers
1k views
Edit Custom Database Tables in Wordpress
I have a site that uses custom database tables to manage info that is inserted by a process completely independent from Wordpress. The data from the table is used in the Wordpress site but it is not ...
2
votes
2answers
95 views
The revisions table in my database is at 70% capacity and growing. What should I do?
I installed the Wordpress System Health Plugin and it says that the revisions table in my database is at 70% capacity with 994 rows. I don't fully understand what this means. I anticipate that my ...
2
votes
2answers
131 views
How to diagnose and keep in check encoding issues?
What we have for a project is:
multiple sites (production, test, local development);
migrated by multiple methods (PHPMyAdmin, Navicat, BackupBuddy);
And the issue we are having is that while ...
2
votes
1answer
340 views
Corrupt Wordpress Database
The weirdest Wordpress problem ever I think. A clients site with a large database of posts has got a mind of it's own. One minute everything seems fine, the next posts, categories and tags are ...
2
votes
1answer
44 views
Filter WordPress posts by between parameter
How to filter WordPress posts by a taxonomy and between parameter? Consider a mobile website with "memory size" taxonomy, I need to show posts that have more than 256 mb memory and less than 768 mb.
...
2
votes
1answer
103 views
How to increase the character limit for post name of 200?
I have post name in Thai which uses UTF-8 character. Many of them encode into super long in ASCII e.g. วิธีการหลีกเลี่ยงข้อผิดพลาดทั้ง-8-ในชีวิตการแต่งงาน
I've changed the type of "post_name" using ...
2
votes
2answers
189 views
WordPress Database Charset/Collate
Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?
2
votes
3answers
204 views
Best way to import users, post and categories from an external database
I need to migrate an existing website to WordPress. This website already has a basic database containing users and posts (with a category), but it also has a high number of records so it's not ...
2
votes
1answer
72 views
Is it wise to delete post revisions and autosaves from database?
I'm just wondering is it wise to delete all post revisions and autosaves from database every once in a while?
I mean they take a lot of database space and apparently have no use after the post has ...
2
votes
1answer
331 views
How to use custom post type APIs, but use a different db table
We currently have a plugin that creates a new WP table, but it recreates the wheel when it comes to managing/updating data. It would be a good candidate for custom post types, but we don't want to ...
2
votes
2answers
326 views
Database slowdown after update to 3.4.1
I own a wordpress installation, and Updated to 3.4.1.
After the upgrade, I got a very strange slowdown to my wordpress.
After all, I used the
define('SAVEQUERIES', true);
in my wp-config.php with ...
2
votes
2answers
2k views
How to delete outdated, wrongly sized images in _wp_attachment_metadata?
I've got several custom image sizes for my blog. One of these is setup as add_image_size( 'slide', 640, 290, true );. These are used in a header slideshow.
My problem is I've upped the dimensions of ...