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

learn more… | top users | synonyms

3
votes
0answers
387 views

comment_post_ID 0 (cannot remove from dashboard)

Ran across something a bit odd that I haven't seen before. A client has a pretty active blog and uses Akismet (paid) to protect against spam. At least once a day, they're reporting a spam comment that ...
2
votes
0answers
41 views

Should I hint table index for search query on wp_post

I'm currently inspecting a WordPress setup with multiple custom post types that should be included into search results. The database query for a search after the word Search looks like this: SELECT ...
2
votes
0answers
37 views

Backup another database with BackUpWordPress plugin

Is there any possibilities to add another database which is connected to other wordpress plugin? My site is using two database: main wordpress db and additional db for plugin data. The Backup includes ...
1
vote
0answers
21 views

Transferring WordPress Database - Serialised data

I'm attempting to migrate data that is using a plugin (WordPress Job Board) to a new instance of a plugin (WordPress Job Manager). The plugins are storing data differently in certain parts of the data....
1
vote
0answers
32 views

Localhost to Staging to Development Dynamic WP-CONFIG

I am trying to setup 3 environments: Localhost, Staging and Development. The issue is that each environment has its own db. We want to have ONE config file which will dynamically change the Db ...
1
vote
0answers
34 views

wp_insert_post causing There was an error connecting to the database: Access denied for user 'root'@'localhost' (using password: NO)

I have a multi-step form which I am trying to fix but I am getting the error: Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/xxxx/public_html/wp-...
1
vote
0answers
28 views

Show all data in database table and make it into an interactive table

I have to make a table where my data from my database can be stored and rearranged with every row. The name of every row should be a link to the function mymanual_edit(). Look at the image for ...
1
vote
0answers
24 views

Emojis replaced by '?' automatically

I just discovered that all emojis on my site were replaced by the ? char. I saw this on comments and posts. Tables like wp_comments or wp_posts had a utf8mb4_unicode_ci collation before and now, so ...
1
vote
0answers
22 views

How to update the values when the featured image has changed?

I'm trying to implement this function. It saves in the database the dominant color of the image uploaded as featured image in a post. It's working perfectly BUT the problem is that it only works when ...
1
vote
0answers
28 views

Trouble Migrating all data blog from Wordpress.com to Wordpress.org

I'm transferring a WordPress.com blog to a new WordPress.org website but I'm having trouble transferring everything. I've gone through the usual WordPress tools - export XML file, import using the ...
1
vote
0answers
105 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 ...
1
vote
0answers
24 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
0answers
107 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 ...
1
vote
0answers
55 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 ...
1
vote
0answers
89 views

Refresh page after update_post_meta

I have created a input field on a front-page where the value of the database is on the same page as the input-field. If a value is passed to the database I have to reload the page for it to show on ...
1
vote
0answers
169 views

Create a table with wordpress plugin boilerplate

I am a new wordpress developer and i would like to create my first wordpress plugin based to wp plugin boilerplate template plugin. My plugin will have to do with my clients data so for this reason i ...
1
vote
0answers
300 views

Slow SQL_CALC_FOUND_ROWS Query

We are experiencing very slow performance with queries that use SQL_CALC_FOUND_ROWS within the admin section of WordPress. We currently have about 125,000 posts on our site and use Varnish to cache ...
1
vote
0answers
209 views

Set Display Name to first and last name (phpmyadmin SQL Query)

I'm trying to change all the users Display Names to be their first and last name. I have looked into a number of plugins and wrote my own PHP to try and accomplish this however the site has over 50,...
1
vote
0answers
27 views

Migrate database between 2 different wordpress version

I have been trying to import a sql dump from a production site, which is several wp version behind the development site (4.1), is there any compatibility issue? Every time I try to login after the db ...
1
vote
0answers
418 views

Separate Database Tables For Different Post Types

one big problem with wordpress is that everything on it is a post(a record in wp-posts table)! images, posts, pages, products(for example in woocommerce), portfolios, Post Revisions... Almost ...
1
vote
0answers
80 views

delete duplicate comments

I found a solution for this a long time ago. Here is the code: <?php require_once('wp-config.php'); global $wpdb, $comment_content, $comments,$comment_ID; # First select all comments $query = "...
1
vote
0answers
22 views

localize elements in database

I want to localize my website with .mo files. Now, while it's pretty easy to scan existing php files and add the relative translation, it's not clear to me how to localize the elements in the db. I ...
1
vote
0answers
59 views

Store partial database to an archive database time to time

As the community knows me that I'm not a PHP Developer by core, but trying to be one. With the company I'm working, I developed many WordPress powered News Portals, where- They publish at least 30 - ...
1
vote
0answers
185 views

Child parent relationship inside WP DB

i am a .net user so i am unfamiliar with not using a foreign key inside of the database. On my WP application, user's are able to create videos on the application, the videos are stored on a ...
1
vote
0answers
30 views

How to migrate the posts from an old custom legacy blog to a new WordPress website?

I have to migrate the posts of a very old custom legacy blog made in ASP (the posts are stored in a MySql table) into a new WordPress blog. So I need your help to find the smartest solution to do it, ...
1
vote
0answers
780 views

WP_Query orderby and tax_query

My goal is to have custom posts type's posts (CPT for simplicity) from a custom taxonomy (CT for simplicity) let say CT Hometown with slug Nebraska to be listed grouped by another CT, let say ...
1
vote
0answers
78 views

Insert menus in the database

I want to create a large menu structure, and the admin pages time out, so I cannot insert them via the admin screens. How can I insert the menu entries directly in the database? Thank you
1
vote
0answers
432 views

Strange Deadlock database error for the query “Delete From wp_options”

I'm experiencing a strange Database error in these days, and it could the the cause of the slowness of my website (tasc.it) in these days. I found this error in the PHP error log, I can see about 4-5 ...
1
vote
0answers
93 views

Is there an atomic way to update_option in Wordpress (to ensure data integrity)?

I want to update an option which is an array by adding a new value, but there's no atomicity or guarantee of data integrity. EXAMPLE //Get the option value (an array) $val = get_option( "some-option"...
1
vote
0answers
29 views

Removing Mutlisite lines stop DB connection

I'm trying to revert my mutlisite to a single site and following a guide it recommends removing the following /*define( 'MULTISITE', true );*/ define( 'MULTISITE', false ); define( '...
1
vote
0answers
72 views

Wordpress plugin creating database in localhost but not on real host

So I am busy creating a plugin that creates a custom table to read in some data. The plugin works 100% on localhost but does not create the table in the db on the real host. I have debug enables and ...
1
vote
0answers
65 views

Move out of sync posts from one database to another

I have an issue where the following has occurred: WP install is pointing to database server 1. Database server 1 is backed up. Database from DB server 2 is restored onto DB server 1. I need to get ...
1
vote
0answers
462 views

How to track a users progress through pages by inserting data into Wordpress Database?

My website users can learn British Sign Language through Video Tuts, Quizzes and games etc. I would like to track the users progress through the pages of the course and add that data to a Wordpress ...
1
vote
0answers
492 views

How to populate custom field dropdown box based on prior selection?

I have two dropdown boxes for a search that uses custom fields and I need the second dropbown box to be populated depending on the results of the first box. So far I have: <form role="search" ...
1
vote
0answers
417 views

Wordpress running SQL query to update database from form

Basically I want to take information in from a form and use a separate php page to update the database. so here is the original wordpress php page (add_person.php): <?php /* Template Name: ...
1
vote
0answers
61 views

Importing 10 Years of Media into the WP Database

I've been running the same website for 10 years now, and whenever I would create a news story, I would manually upload and store all my news images in a "news" folder via FTP and then manually write ...
1
vote
0answers
3k views

How to fix database error duplicate entry

At first I thought this was just a damaged table, so I tried repairing via MySQL, but it appears there's more fundamental issues. Which of the duplicates should I remove, and any further advice in ...
1
vote
0answers
92 views

database query with more than a couple meta hangs and doesn't complete

I have a development website with about 70 checkboxes for custom fields. The idea is the user selects one or more checkboxes, it queries the database for all posts that have a meta_key for the ...
1
vote
0answers
127 views

Multisite 404 on pages - rewrite error breaks database

After updating my reading settings on my multisites, I get 404 errors on all my pages. The only way to fix the issue is by reverting the database to previous version, that is the only way it can be ...
1
vote
0answers
102 views

Copy post to separate database with “add_action(…)”

I'm basically trying to have a copy of a post be sent to another database's table when it's published. I've gotten it to add a new row in the new table, with my own static arguments, but I'm not sure ...
1
vote
0answers
483 views

Easiest Way to Authenticate WP Users Using an External DB?

I have been looking for the best/easiest way to share users on a WP blog (in a subfolder) with the MAIN site's user database so that people do not have to register/log in on the WP blog when already ...
0
votes
0answers
30 views

I want 3 WordPress websites, with the same users able to login to each

I want to install 3 WordPress websites, and I want users to be able to sign up to any of the sites and then access all the other sites with the same login credentials - like Google where you can sign ...
0
votes
0answers
10 views

Plugin option page store draggable list in WP database

I have create a plugin. On the plugin option page I use a sortable list. I will save the order in a db table (example xxxtest). What's wrong. I see that ajax transmit (success alert) but nothing ...
0
votes
0answers
8 views

Bulk update post slugs (find and replace all)

Is there a way to bulk update permalinks through the database? I have several 100 posts and all I want to do is replace all "-" to "_" to the permalink. I could just manually update but that's too ...
0
votes
0answers
15 views

Use Shortcode to pull specific custom post type into any page

I'm looking for a way to code a shortcode like [shortcode slug="slug-name"] that will pull data from the slugs specific custom post type and fill the variables of my template that I'm attaching or ...
0
votes
0answers
15 views

Multiple file upload frontend and capture their paths

<input name="image_url" type="file" /> <input name="Submit" type="Value" value="Přidat" /> I have this in html form and this in php : if ( $_FILES['image_url']['name'] != "" ) { ...
0
votes
0answers
12 views

WP_Query - Find the State and Match Zip Code

I a trying to develop a search box in which people can type in the State and enter a zip code and in return the results will show specific people. I have added Advanced Custom Fields and each person ...
0
votes
0answers
24 views

Connect Local Install to Remote Database

I would like to connect a local installation of WordPress to a remote database. How would I go about accomplishing this?
0
votes
0answers
37 views

How can i change posts dates random?

I have totaly 5k content. I need change all of them dates. How can i set randomly dates? SQL? Example from 01.01.2010 to 20.06.2016 everyday can be dates.
0
votes
0answers
26 views

Database with mixed collation (utf8mb4 & utf8_general_ci)

Each time I was uploading my WP install from offline to online, I was noticing strange characters in text and digging a bit I have discovered that wp-config.php on the online server was set to define('...