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

learn more… | top users | synonyms

0
votes
1answer
73 views

wpdb get_results() returns only 2 rows

I am trying to create custom admin widget to present how many users has registered within last days. I have created function as below: function mdbootstrap_add_dashboard_recent_users(){ global ...
0
votes
0answers
20 views

Bulk find replace to convert hundreds of old URL calls

We have a new wordpress site generated from an old html site with thousands of pages. An import process was used, but unfortunately as a result the site has hundreds of references within content to ...
0
votes
0answers
78 views

Wordpress installation: Error establishing a database connection

I've successfully installed Wordpress on my local system and used it to create a demo site. Now I'm struggling to get an empty wordpress installation to work on my webspace. Running the install.php in ...
0
votes
0answers
58 views

How Can I lock function to prevent running multiple instances in one time?

I have written a plugin. There's a function int it that works with a DB table and (works on a data tree) ,I want if function starts running ,other instances lock until it finishes(then other instance ...
0
votes
1answer
53 views

WPDB - Read and write value from / to database

I have a custom field in usermeta called vatnumber. If the field has a value, how do I read that specific value for user X? Here's what I have so far: <tr class="vatnumber"> ...
1
vote
2answers
45 views

Delete database tables on theme uninstall?

How can I execute DB queries when theme installs and delete those tables on theme uninstall?
0
votes
1answer
22 views

Design problems when exporting remote database for local development

A remote host is running Wordpress 3.6.1, and Wordpress needs to be upgraded. The plan is to make a local copy, do the upgrade of files and database, confirm things work, and then publish this local ...
0
votes
0answers
49 views

Can't Install WordPress (local) Failed to open file wp-includes/wp-db.php

Title kinda says it all. Trying to install WP locally and I get the following error when trying to use the wp-config.php generator UI: Warning: mysqli_real_connect(): (HY000/2002): No such file or ...
0
votes
0answers
41 views

get_the_terms is not working

After I updated WordPress, a function using get_the_terms() is not working. When I run get_the_terms() I'm not getting terms, but when I add before that call wp_cache_flush(); I'm getting terms so ...
0
votes
1answer
61 views

Buddypress avatar image in database [closed]

I want to get path of buddy-press profile pic directly in database to be used on other then word-press platform but i am not able to find it in database.. because i can't use buddy-press functions in ...
0
votes
1answer
40 views

Help me filter get_adjacent_post

I'm not keen on private posts interspersed with published posts on the front end, so I'm writing a plugin that seeks to segregate and separate them out. As part of this I want to modify the post ...
1
vote
0answers
22 views

Change setting name in Customizer and keep the data

I created a theme while back when I was new to Customizer API and for some weird reasons I named theme settings as: $wp_customize->add_setting('thefunk_theme_options[header_color] Instead of just ...
0
votes
1answer
59 views

WP Database Table to CSV file

I'm working on creating a script that takes a custom WordPress database table and exports it into a CSV file. I cannot seem to get it to work. Can someone help me out <?php $parse_uri = explode( ...
4
votes
1answer
57 views

How to define composite keys with dbDelta()

I am getting error while trying to create a table with dbDelta() and composite primary key. The sql is pretty straight forward. $sql = "CREATE TABLE {$wpdb->prefix}voicemail_call ( user_id ...
0
votes
1answer
31 views

Post Meta for Custom Post Types

I am using WordPress to build a job website and a huge portion of my website is involved with storing and retrieving user information to and from the database. There are three types of custom posts ...
1
vote
1answer
36 views

Getting id of poll from WP database

So I have a php statement: $latest_pollsid that contains a number which increases by 1 every time a specific form is submitted. I am reading this statement into several functions and for one of these ...
0
votes
4answers
58 views

wp_posts table: safely remove unused columns to save database storage

i search about it on google but didn't find any thing. I want to remove my wordpress wp_posts table's unused columns, to save my database storage... I know if table column is empty it will not ...
1
vote
0answers
61 views

Connect to live db whilst working locally

Please excuse my ignorance, as I'm entirely self taught (HTML, CSS, and some JS and PHP) as a hobby, and SSH is all fairly new to me. I originally built a static website for my wife's childminding ...
3
votes
1answer
54 views

Issue with foreach on duplicate meta_key's

Im storing using add_user_meta custom values that get sent to the front page of the website. Here is the php code. $user_query = new WP_User_Query( array( 'fields' => 'ID' ) ); ...
0
votes
0answers
13 views

Can't get URL rewrite to work for participants database plugin

I am fairly new to WordPress, but here we go. For the past 18 hours or so, I have tried every method I have found on the internet in an attempt to force the url example.com/file/?pdb=3 to become ...
1
vote
1answer
38 views

Custom fields not getting saved in the databse when added to the add new user profile page

I want to save the custom field values in the wp-users table. Do I have to create the fields(client and user_groups) in the table or it gets created automatically when the data gets saved into the ...
1
vote
0answers
18 views

Logins from WP users table use on another page

I'm creating new website and I want use logins from WP table wp_users. I have problem with password encryption. I tried something with PasswordHash(8, True) but it generated string, which doesn't ...
1
vote
1answer
57 views

Delete all post meta except featured image

My aim is to clear up my database entries. I did a migration from blogger which added many useless post_meta. I found a plugin (db reset) that has the option to reset/delete all post meta. However if ...
-3
votes
1answer
65 views

Does anyone know what the wp_snp_stats table is? Maybe I was hacked?

Nothing is pulling up in Google. I've got a good handle on all my plugins that create custom tables. If you're familiar with this table, please let me know. Or else I have a long road ahead. Thx
0
votes
1answer
27 views

Associating special meaning with user id 0

I'm writing a plugin that creates a custom table holding data which is linked to a user account with a user_id field. Now if that users account would be deleted for any reason I would like to set that ...
-2
votes
1answer
202 views

Upload wordpress from localhost to 000webhost

I want to know how to upload wordpress localhost to server with plugin and filezila i tried many times but failed. When I'm upload wordpress through filezila database cannot connect to the site. Tell ...
1
vote
0answers
78 views

inserting a post from an extern php file but post content doesn't show on wp site

I'm doing a php file that insert post's on my wordpress site. I'm filling all the fields in wp_posts, but the content doesn't shows on my wordpress site. I wonder if it's because the categories are ...
0
votes
0answers
13 views

Post links behaving weirdly after migrating DB to Amazon

I have partially successfully migrated a local DB for a WordPress site I was working on. I imported the new DB using phpmyadmin and move the template and seems to be working fine. The only thing that ...
1
vote
0answers
51 views

Least expensive way to get table prefix in multisite installation

I am writing an api that will have to handle extremely high volumes of calls so, in short, I can not afford to load the WordPress core every call. I have no problem building the API to use the ...
0
votes
1answer
192 views

Error: SELECT SQL_CALC_FOUND_ROWS

My php error_log keep showing this message, WordPress database error Unknown column 'wp_postmeta.meta_value' in 'order clause' for query SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE ...
0
votes
0answers
14 views

update_post() on all databases of a multisite wordpress

I want to change a certain option from every single site of a multisite networks. I wrote the following that I hope will update all databases $allSites = wp_get_sites(); foreach (allSites as ...
0
votes
1answer
18 views

WP_Query with page_ids in arguments without a result

I want to get some pages with WP_Query: $resume_args = array(); $resume_args['post_type'] = 'resume'; $resume_args['posts_per_page'] = -1; //$resume_args['page_id'] = array(9046, 9346); //No ...
1
vote
2answers
136 views

Why do wordpress store pages/posts within the database instead of files? [closed]

I don't understand why wordpress stores that kind of data: posts' content and pages' content, directly within the database instead of storing it in the filesystem and referencing them in the database ...
0
votes
1answer
79 views

How do I make this Metabox show current DB value?

<p> <?php $options = get_option( 'city' ); $names = explode( PHP_EOL, $options ); ?> <label for="City" class="timeshare-row-title"><?php _e( ...
0
votes
1answer
40 views

WordPress security [closed]

I created a website for my customer via wordpress and I uploaded it in their server ..we assume the user have the access in the whole server ..is it possible to protect this website from being used in ...
0
votes
0answers
236 views

Delete all posts of a custom post type—efficiently

I'm looking for a safe and fast way to delete all of one custom post type's posts. Using get_posts() and wp_delete_post() for each returned post does not work; it's not fast enough due to the sheer ...
1
vote
1answer
23 views

I need to get an array from the wordpress database

I need to convert this code //This creates an array from the database and allows us to use it later in the jquery //CREATE SQL STATEMENT $sql_locations = "SELECT * FROM tbllocations"; //EXECUTE SQL ...
1
vote
1answer
38 views

How to write Hebrew characters?

Our database is set to: define(‘DB_CHARSET’, ‘utf8’); define(‘DB_COLLATE’, ”); As a result, entered Hebrew characters in a post are turned into question marks (?) on saving of the post. What is the ...
0
votes
1answer
41 views

Need help for creating custom table on wordpress

I'm trying to learn how to create and use custom tables on wpdb for a plugin that I'm going to build. So far I've seen a bunch of tutorials and know how to create a table but I'm facing problems ...
0
votes
0answers
36 views

Export User Info into CSV - Additional Column (post_title)

I'm using the 'Export Users to CSV' a plugin for wordpress. By default, The plugin only extracts wp_users and wp_usermeta I have been wanting to add post_title column from wp_posts. I was able to ...
0
votes
2answers
28 views

Issue “Error establishing a database connection” problem.

Here's the situation. I needed to create a copy of the website online so that I could redesign it and collaborate with others to redo the content. Consequently: I copied a website (example.org) to ...
0
votes
0answers
21 views

get backup file from wordpress database in x days

I have a wordpress website with so many posts and custom fields located in meta table. What I have to do is to make backup from each 30 days (for posts and postsmeta table) and append it to my last ...
0
votes
1answer
315 views

Inserting Post Meta From SQL

I'm trying to get post meta to be updated/replaced with $wpdb and running into issues. I have working SQL, but cannot get it work when coding it up for my WP plugin. Extra note: The post meta being ...
0
votes
0answers
19 views

Store id from database query in cookie

I need to store an ID value which is generated upon doing a database insert. After the insert, javascript redirects the user to an external page, which will then redirect back to a wordpress page ...
0
votes
1answer
83 views

Accessing external database: ERR_INCOMPLETE_CHUNKED_ENCODING

I installed the "Insert PHP" plugin in my Wordpress page, activated it, and put this code in my page: <p> Connection test </p> [insert_php] $mydb = new ...
0
votes
0answers
22 views

Allow network sites but also allow single sites

Ok, I think I really need some help here. I am feeling like this is more complicated then it should be. Here is my aim. If plugin is used on single wordpress site than allow and use the class ...
0
votes
2answers
61 views

How do you build a database-centric site in WP?

The best way to explain this might be to relate my site to a comparison shopping site, as I have around seven tables with 500k+ records each. The content on my site is a comparison of items, and ...
0
votes
2answers
109 views

Split database on large site?

What will be best way to split large database on single site, not multi-site wp installation? HyperDB is maybe for this (just, less than 10 webmasters managed to figure out how to install it, ...
0
votes
1answer
38 views

Can form entries from a WordPress form go to a database

I am using Wordpress 4.3.1. I have built a stand alone form (form 1) using PHP where one can enter volunteering tasks doable in a city, has fields like volunteering activity, city, state. The values ...
0
votes
0answers
16 views

MyISAM vs InnoDB [duplicate]

We have a Wordpress website with almost 100k posts (and many more drafts and images). Number of simultaneous visitors reach 6k at peak times. Which database is more suitable for us?