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

learn more… | top users | synonyms

0
votes
0answers
7 views

Delete duplicate rows from wordpress database where a column is duplicate in phpmyadmin

I have a wordpress table like so (phpmyadmin and MySQL) | id | meta_key | meta_value | +----+-----------+------------+ | 1 | import_id | abc | | 2 | import_id | abc | | 3 | ...
0
votes
0answers
13 views

Inserting posts to database

I want to import a bunch of posts directly into the database and I'm wondering how I can do this? I found this script ...
0
votes
0answers
20 views

Remove comments from database

I have a number of comments generated by a WooCommerce payment gateway module. For some reason the comments can not be deleted in the backend (no checkboxes). Would it be safe to delete them from the ...
0
votes
0answers
8 views

wp_insert_post another database with custom field

wp_insert_post with the command you want to transfer the contents to another database, I use the following command <?php require('wp-config.php'); $conn = mysql_connect($dbHost, $dbUser, ...
0
votes
0answers
7 views

How to parse meta value from user specific post to google charts?

I'm currently working on a project where i need to visualize the progress of users (fitness). For that i have created a custom post type with custom fields. I want to parse the meta values associated ...
0
votes
1answer
27 views

$wpdb->get_var - What value is returned when zero records are found?

I have the following code: $queryPermission = $wpdb->get_var( $wpdb->prepare("SELECT Active FROM testers WHERE user_id = '$user_id' ")); ...
0
votes
1answer
50 views

single.php not pulling in any data from database

My single.php doesnt seem to be fulling any information through from the database for the current post. here is my single.php code: <?php get_header(); ?> <div class="main-container"> ...
0
votes
2answers
84 views

Installing local to live WP into subdirectory

I am having a bit of trouble moving a local WP site live and into a subdirectory. I want a static homepage for now (index.html in the root folder) while I work on the live site (would be found in ...
0
votes
2answers
32 views

Duplicate domain database to local - How?

I've noticed that my process is rather slow and i'd like to speed it up. I want to be able to duplicate my database from my domain which is blueharlequin.com and work locally thus speeding up the ...
1
vote
2answers
72 views

Should I global $wpdb outside of any of my plugin's functions scope?

I know that the general advice to global variables is to not use them at all. Still, when doing something with the Wordpress database, it is required to do global $wpdb; to access the methods ...
1
vote
1answer
59 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
254 views

Wordpress choose wrong database

I have 2 databases. When I include the database connection (with a include('filename.php');) wordpress acts really strange. I can't login, the wordpress username and password is right but it tries to ...
3
votes
4answers
441 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 ...
0
votes
1answer
221 views

Contact form with database integration issue

This is more a question about the idea I am going to share and ask for advice for. I would like to have a contact form on my site, where people complete their data and it gets stored inside a ...
0
votes
1answer
26 views

Understanding WordPress Search

I am trying to create a custom search similar to the one on totaljobs.com but through a WordPress site. Essentially I would be able to search for both search terms and location simultaneously. The ...
0
votes
2answers
427 views

MySQL Syntax Error upon restoring database from backup

Performed a bad import to my Wordpress install and decided to restore from the mqSQL backup (full export) I had made minutes earlier. Dropped all tables in the database and then did an import from my ...
0
votes
1answer
254 views

Get value form wordpress database

I'm sorry if this ambiguous but I'll try my best I have the following php code from a WordPress Plugin $url = 'http://mydomain.com/'.$ListingID.'/'; I need to define a value for $ListingID The ...
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 ...
0
votes
1answer
22 views

What is the purpose of storing `siteurl` in database?

Why does WordPress store 'siteurl' and 'home' in the database? It's driving me crazy because I develop locally, deploy to a staging site, AND to a production site, so that's two-three times I have ...
-2
votes
0answers
10 views

Issue in add and view product [closed]

When I filled category of product it give message like these You have not registered to add a product So, I checked in wp-inter-seller table of database and then i show there is no user details(user ...
2
votes
3answers
247 views

How do I save data from submitted form from widget

I'm looking over internet for some simple solution of email subscription widget but no luck. Or they are too complicated and paid, or they are relaying on some external email functions. I'm not a ...
1
vote
1answer
14 views

How to display posts by vote count and if no value continue with latest posts with no votes?

Maybe someone can help me with this. I want to display posts by votes. Users can only vote up. So what I want is - the most voted posts by vote count on top and then latest posts with no votes. The ...
0
votes
0answers
44 views

How to select from a WP table every 10s in a class (OOP)?

I'm trying to select records every ten 10 seconds from columns message and messagetwo from my WordPress table wp_userlogin, but the code is not being executed. I'm calling wp_schedule_event when my ...
17
votes
6answers
16k views

Using wpdb to connect to a separate database

I want to connect wpdb to another database. How do I create the instance and pass it the database name/username/password? Thanks
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 ...
-3
votes
0answers
18 views

How to store form submissions and edit their statuses in admin area?

The main idea is to create form (product purchase) and store submissions in DB. In admin area I need to assign statuses for each submission and assign completion to user role 'manager'. Create user ...
0
votes
2answers
249 views

Import External XML

I don't know where to start with this one. I would like to create custom post type which will list properties on clients website. I would like those properties being feed from another ...
3
votes
0answers
47 views

Uploading/Deploying a Multi Site Install

So I was looking to create a multi site for a clients since the goal is to have the same branded theme on several sub domains to deal with different countries (e.g. mysite.com, usa.mysite.com, ...
1
vote
0answers
19 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
4answers
2k views

Export wordpress table to excel

I have created PHP scripts before to export a database table to .xls format like this: $select = "SELECT * FROM tracking"; $export = mysql_query ( $select ) or die ( "Sql error : " . mysql_error( ) ...
0
votes
0answers
21 views

A plugin is giving me “You do not have sufficient permissions to access this page.” error

I noticed this morning that I was logged off from my site. Whenever I tried to access /wp-admin it gave me a "You do not have sufficient permissions to access this page." error. After an hour of ...
2
votes
2answers
415 views

How might I retrieve a featured post image from an external WP site and display it as a link back?

I have two WP sites. I want to reach from one of them, into the other, and retrieve specific featured images for posts, and display them with a link to that post. I am using this line (with the ...
1
vote
1answer
33 views

Access Wordpress database outside of Wordpress

MAIN QUESTION: I am writing a wp plugin. Within it, I have a page located here: http://example.com/wordpress/wp-content/plugins/myplugin/page.php How do I access WP database from this page? Is ...
1
vote
1answer
33 views

Is $wpdb->prepare escaping to much? How to use it properly?

Im pretty much confused by $wpdb->prepare. I want to use it to sanitize user input but it turned out that it destroys the query. I cannot imagine that this is how it's intended to work but I can't ...
2
votes
1answer
734 views

Database sync between local and production

I was watching Mark Jaquith's presentation at WCSF 2013 recently and in the Q&A Mark mentioned something about rsync - after a quick Google I can see this is done via SSH - my question is this: is ...
3
votes
1answer
181 views

Should I use Transients with W3 Total Cache APC Caching?

Should I use Transients in my queries like this? <?php if ( ! $my_paged = absint( get_query_var( 'paged' ) ) ) $my_paged = 1; if ( ! $my_query = get_transient( "567recent_$my_paged" ) ) { ...
3
votes
2answers
6k views

Connect to database using wordpress wp-config file

How can I connect to the database using the wp-config.php file ? I'm trying to make a script more Wordpress friendly, and I need to connect to the database, but without installing the script as a ...
1
vote
1answer
199 views

Hello dolly type plugin that allows people to add their own

I am making a plugin that shows a random joke on a custom 404 page via shortcode and it is basically near enough the same as the default hello dolly plugin, where the jokes are hardcoded into the ...
0
votes
0answers
17 views

Save voting stats with Posts 2 Posts

I am working on a website where I make connections from posts to posts with the Wordpress Posts 2 Posts plugin. Now I want my website users can vote whether they think the 2 connected posts are a good ...
5
votes
3answers
3k views

Can posts have parents?

Are posts supposed to have parents? If so, what would that mean for a post to have a parent? Also, if there are some constraints to posts having parents, then where is that enforced? Not in the DB as ...
-1
votes
1answer
25 views

Remote database -> massive response time increase?

I have nginx web server running newest WordPress and DB server running MySQL 5.6 There is around 90-100ms latency(round-trip delay) between those 2 servers. The problem is that It takes about 5000 ...
1
vote
2answers
39 views

How should I store a log for my plugin

I have a plugin that sends data to a server as part of a transition_post_status action. The server sends a response each time. I want to keep a log of these responses (permanently) that I can display ...
0
votes
4answers
439 views

Multisite database upgrade SSL error

I have upgraded my Multisite setup WordPress to 3.6.1. And after that, when I do Network Upgrade > Database Upgrade it's showing: Warning! Problem updating http://www.example.com/site1. Your ...
1
vote
1answer
718 views

How to create database table, add data, update and delete using wpdb via plugins?

I am just starting out to create plugins with database. I know to create a custom database when activating the plugin. I just want to know whether we can create tables at the front end like adding the ...
0
votes
0answers
32 views

Mysterious template change after database import/export

When I switch databases from my local environment to the host, some of the pages inexplicably change templates. E.g. there is a custom template "Home" and when I switch the db's it ends up with the ...
1
vote
1answer
42 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"> ...
0
votes
1answer
350 views

Where would I find Custom menu attributes in the database?

In what table would I find the title of a custom menu in MySQL for Wordpress 3.5.x?
0
votes
2answers
64 views

Different database query in function.php using mysqli

I am trying to connect to a database in the function.php using mysqli. The code seems to run fine when it is not on a separate php file not on wordpress. But when I run it on wordpress I get "Connect ...
0
votes
0answers
46 views

Problem with Featured Image and database

I have an issue with with WordPress install which I just haven't been able to resolve... I have tried disabling all plugins and reverting back to default theme, but the problem remains. The issue is ...
0
votes
1answer
1k views

Simple form that saves to database

I am using a 3rd party service that does a scrub of my database for new entries within a specific table. However I am been unable to find a simple form plugin that submits data to the wordpress ...