WordPress stores user generated content, along with other configurable information, in a a database (typically MySQL).

learn more… | top users | synonyms

1
vote
2answers
1k views

How do I copy a wordpress database?

I'm trying to migrate my wordpress site from an old host to a new host. The Wordpress Codex says "you can move by just copying your files and database." Copying the files is easy enough, but how do I ...
1
vote
1answer
225 views

One post carries 30 postmeta values, is this too much?

I have some data saved as post meta, occasionally some plugins may save an extra piece. Now I installed bbpress, it saves at least 10 pieces of post meta. Adding them together, there are nearly 35 ...
1
vote
1answer
541 views

WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file!

I´m building a WP Multisite for a client that wants a multilingual site. Before choosing WP Multisite, I bought and tried out WPML. However that plugin didn't fit for the job so I deleted it and got a ...
1
vote
1answer
623 views

Where are wordpress custom types stored?

Where are custom types stored? Because when a custom type is created, in wp_posts, the post type is set to the <new_custom_post_type>. But where are the details of the new custom post type ...
1
vote
3answers
853 views

Use one Wordpress database with multiple instances of one site

Is there a way to use the same database, tables and all, with two different domains? For example, two employees each have thier own subdomain to develop / test with, so there may be two instances of a ...
1
vote
1answer
547 views

Within the database, where is the flag which says that a user has Super Admin rights?

I have an user in a Wordpress Multisite installation and have access to the Mysql database, I would like to give myself super-admin rights to access the wp-admin/network page. Where can I do it on ...
1
vote
1answer
70 views

Export all content from wordpress

Evening all. I've decided instead of upgrading the install of wordpress that I have, to just take the content (my writeups, comments, pages) and move them to the new site install. Is there an easy ...
1
vote
2answers
361 views

Bootstrapping Wordpress MultiSite Outsite of Wordpress - No $wpdb

I'm working on a plugin for a system to use Wordpress as the authentication backend, so that I can use my existing Wordpress users in another application. The plugin works great when running in single ...
1
vote
3answers
939 views

Import 10,000 Users into Wordpress WITH a specific ID for each user

I have a website which has about 10,000 users. I am converting this site over to Wordpress. The new site is ready to roll, but I have to bring over all the users. There are a number of plugins ...
1
vote
2answers
522 views

Wordpress doesn't show all posts in database

I have around 140 post in database but wordpress admin page shows just 50 post. How could I let wordpress shows all the posts in database? Thanks
1
vote
4answers
3k views

After server migration only the homepage works

I have recently changed hosting of my WordPress site to VPS.net. I have moved all of my files and imported the database. Everything appeared to be fine until I clicked a link and noticed that all of ...
1
vote
1answer
517 views

Is it possible to split database tables using HyperDB?

I'm looking for an answer from someone who's implemented HyperDB or has knowledge of it. I have a database which has just passed the 100mb mark a week or so ago, the problem is my host only allows ...
1
vote
1answer
1k views

Safe way to find last inserted id in a table?

Is it safe to use $wpdb->insert_id; to find the id of a last updated row id just after an update? ex: $sql = $wpdb->insert($table_name, $arrayWithDataToInsert, array('%s','%s')); ...
1
vote
1answer
200 views

WP database error for comments_popup_link()

I'm using the comments_popup_link() function to show the number of comments for each post in a loop. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php if ( ...
1
vote
1answer
630 views

Adding new row to wp_post table

I want to add 2 more rows (for voting up or down) to my default wordpress posts table. Would those rows be deleted when I update my WP version, or cause any other problem? An alternative would be to ...
1
vote
1answer
57 views

Wordpress database error - Error in SQL syntax - I can't identify any error?

I am trying to write function that checks whether an email address is stored in my database or not. I've written the following PHP code:: function check_my_users( $email_address ) { global ...
1
vote
1answer
27 views

How to store custom user data on the database?

I'm developing a WP multi-site network which have a goal of 10,000 sub blogs. The site needs to store custom data related to the user. There are additional 20 fields of data for each user. What is the ...
1
vote
1answer
40 views

How to create custom tables in WordPress using my own plugin?

I am new in WordPress plugin development. This is my core PHP and HTML code create-table.html <form method="post" action="function.php"> <input type="text" name="table_name"> ...
1
vote
1answer
58 views

How to determine what is generating large amount of database queries?

For some reason, my Wordpress site is using a lot of memory (spiking at 72MB) and generating a huge amount of database queries (76923 according to Wp-Memory-Usage. I'm really not sure why this would ...
1
vote
2answers
62 views

Why does $wpdb return strings for mysql integer values?

I find it very inconvenient and hard to understand that the default behavior of the Wordpress db-interface is to convert all integer (and float?) types to strings. e.g $wp_posts = ...
1
vote
1answer
30 views

How to interact with another wordpress install on same database?

I am trying to figure out how I can have two WordPress installations on same database with different prefixes ( wp_ and wp2_ ) and I need them to interact with each other. For example I have a Blog ...
1
vote
1answer
303 views

Can I use MariaDB instead of MySQL in wordpress?

Is it possible to use MariaDB instead of MySQL in Wordpress installation? If possible: how do I do that? Is there any drawback or complexities?
1
vote
1answer
23 views

How can I get a list of comments by target

I've been looking at the classes WP_Comment_Query and WP_Meta_Query but to be honest, I can't figure out how to use them together. I want to query the database for comments where wp_posts::post_author ...
1
vote
1answer
35 views

A field with dashes in the slug [closed]

How do I reach a specific userdata in the database, when that field has a dash (hyphen) - in the slug? I use the plugin WP-Members. I have created a new userdata field with the plugin with the name ...
1
vote
1answer
26 views

For best DB performance should I serialize all theme options together or by type?

If my theme has a lot of options is it better to store all options in one database entry, or to use a databse entry for each group of options? IE would I name all options like this ...
1
vote
1answer
177 views

Accessing two databases

I have two databases on my server, and wanted to know is there a way to access both databases from wordpress? My thought is adding the second set of credentials to the wp-config.php.
1
vote
1answer
187 views

How can I create a Bible search engine via WordPress? [closed]

I have some translations of Bible in Turkish language. But, they are as of books. (Matthew, Mark, Luke, John... ) I uploaded them into a website which is being managed by a wordpress software. ...
1
vote
2answers
1k views

Two WordPress sites sharing the same content

My question is this: Is it possible to have two separate installations of WP with two separate domains sharing the same content? Scenario: User on http://A.mysite.com publishes a post. ...
1
vote
5answers
654 views

Moving WP from local server to live, error establishing a db connection

Not sure what's going on here 'cos I've done it already a couple of times and it always worked. Basically I'm moving a testing site from my local machine (MAMP) to a live server by: zipping the ...
1
vote
1answer
2k views

How can I check email exists via a jquery keyup()?

I have setup a jQuery keyup delay function to check the email typed into an input field. It works fine after testing with an alert('Key pressed!'); But I want it to say, for example, 'Yes this ...
1
vote
1answer
36 views

Building an email signup form. Where should the information be saved in the DB?

I would like to try build a simple plugin that collects and stores the name and email address of the person who filled in the form. I realize there are probably dozens of plugins out there that do ...
1
vote
1answer
159 views

Should a child theme share the same theme options row as the parent, or should it have it's own options row?

I'm developing a theme which uses the NHP Theme Options Framework to add some theme options. Naturally, the theme options framework creates a single row in the database to store the theme's options ...
1
vote
2answers
327 views

when I fetch data from remote mysql database in wordpress built in wordpress function is not working?

In one of my page I have to fetch data from remote mysql database. We have connection to remote mysql database by creating new instance of $wpdb class. $mydb = new wpdb(DB_USER2, DB_PASSWORD2, ...
1
vote
2answers
2k views

How to use multiple database in wordpress?

I want to fetch some post from another wordpress site which is hosted in the same server. How can I fetch those post? Is multiple database connection is possible in wordpress?
1
vote
2answers
477 views

how to transfer wordpress sql/database from local to live

So for backing up any/all my wordpress sites i use a tool called "BACKUP BUDDY" and its a great tool and all but lately its been really buggy and today finally it went kaboom! Usually my workflow is ...
1
vote
1answer
419 views

Clean database from unused tables

I used to have many plugins installed on one of my sites, and after deleting most of them, I still have a database full of extra tables, I am sure most of them are unused. How do I clean them off?
1
vote
2answers
2k views

clean wp_options table unused rows

In my Wordpress Blog site i have installed too much plugin and remove also many plugins. In database table "wp_options" size increases approx 13MB and there are many rows which are unused at this ...
1
vote
2answers
807 views

How to initialize $wpdb?

I have a .php page in the theme root to check the data of one CUSTOM form. After receiving this data I need to do a query in a custom mysql table, so I need $wpdb, but I can't use it directly (or ...
1
vote
1answer
523 views

Merge two WordPress installations into one, and keep posts separated?

I have two Wordpress installations that I would like to make into one installation, but still keep the posts (and their meta-data) separated. Both installations currently share the same database. I ...
1
vote
1answer
209 views

How can I store an image in the database with Transients API?

I'm trying to store an image generated with imagecreatefrompng() using the Transients API, but it just stores an empty string (string(0) ""). Also, I notice if I set the transient before imagedestroy( ...
1
vote
1answer
805 views

How to make sense of the active_plugins option_value to enable and disable certain plugins from the database?

Can anyone explain how to interpret and make sense of the active_plugins option_value string in WordPress. And then use this string/ array to disable and activate specific plugins? Here is an ...
1
vote
2answers
1k views

Moving online website to MAMP or dumb idea?

I was thinking of doing some major design (incl child theme and plugin stuff) on an existing site which is rather large. I'm thinking it would be good to do my trial and errors offline and having a ...
1
vote
1answer
2k views

Add Admin User via SQL

I gave my client the admin account to his wordpress install and I forgot to add an administrator user for myself. Now, I can no longer access the admin panel because they have changed their password. ...
1
vote
4answers
240 views

Retrieving a Value from a wp-database

why my sql statement is not returning any value.. is this wrong? <?php global $wpdb; $result = $wpdb->get_results($wpdb->prepare("SELECT * FROM ...
1
vote
1answer
145 views

Adding Custom Forms

I'm looking to create a page for a wedding site that will have a form. The idea is that it is an RSVP page where a visitor will input a unique string that was on the invitation that they received and ...
1
vote
1answer
187 views

Is there a naming convention for database tables created by a plugin?

I have setup my plugin's table to use $wpdb->prefix but aside from that are there any conventions that you should name them; Maybe $wpdb->prefix.'plugin_'.$tablename or something. I can't find ...
1
vote
1answer
150 views

Display SQL that wordpress is running

I am wanting to see the actual SQL that worpress is running to build certain pages, is there a debug method or some other way to outpout this or view it?
1
vote
3answers
92 views

How can I transition a site from using the Beta Tester plugin to a “normal” install?

I'm currently using the WordPress Beta Tester plugin on a site. Is there a "best" way to transition the site to a "normal" WordPress install? The plugin includes this notice: Please note: Once you ...
1
vote
2answers
37 views

What is this in my tables

Cleaning up my databases and I found this in my main table atpp_options perhaps from a plugin, anyone have any idea what it might be?
1
vote
2answers
452 views

delete post meta from db, even if does not exist?

it is not the first i see that we "delete" a post meta even if it does not exist : example : $count = get_post_meta($postID, $count_key, true); if($count==''){ $count = 0; ...