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

learn more… | top users | synonyms

0
votes
1answer
56 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 ...
1
vote
1answer
62 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 ...
3
votes
3answers
103 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, ...
0
votes
0answers
59 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 ...
1
vote
0answers
24 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( ...
0
votes
0answers
150 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 ...
1
vote
1answer
52 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 ...
2
votes
1answer
201 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 ...
1
vote
1answer
256 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
24 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 ...
-1
votes
1answer
114 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 ...
0
votes
0answers
39 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
317 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
2answers
46 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
2answers
949 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
87 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
0answers
68 views

wp_usermeta key problem

I am trying to add a meta key to wp_usermeta but it does not work at all. The key would get value from a checkbox. I used the code from Wordpress codex tutorial and it's not adding anything. I will ...
0
votes
0answers
22 views

Are custom tables a good solution for adding lots of data to the site?

On a fairly high trafficked website (10-20 million page views per month), we're looking to add a large amount of data to build data-driven pages. Think of adding 1000s of restaurants to create ...
0
votes
2answers
74 views

Can WP give a value a post ID?

So I have queried out some data from another DB and obviously they're not a post which means I can't use the standard permalink to link them to an existing page with it's post type. So I thought that ...
0
votes
1answer
44 views

Custom Post Type not showing anything added by code anymore?

So I have a piece of code written and it worked before, hasn't been edited hasn't been changed, no updates on the WP DB no updates on any plugin on WP and it's suddenly not working correctly. This ...
12
votes
1answer
245 views

How can I trust switch_to_blog()?

When I call switch_to_blog() with a blog id, I don’t know if that blog actually exists. The functions returns always TRUE. Here is my problem: switch_to_blog( PHP_INT_MAX ); $post = get_post( 1 ); ...
0
votes
0answers
16 views

Bookmarking a post in exchange for an email?

I was asked to implement a feature that this website https://medium.com/ has, which is the ability to bookmark a specific post by making the user register an account with the website. This is the ...
0
votes
0answers
50 views

Email notifications: Where in database to save user options?

I'm working on an email notifications plugin which sends emails when events happen on my site. So for example, if someone comments on a post, the post author will receive a custom email notification. ...
0
votes
0answers
50 views

What method should I use to store my plugin data (multi level menus with options on each item)

So the background on my plugin - it generates taxonomy/term filters to give you a filtering system similar to what you'd see on NewEgg where you filter your results by category/manufacturer/other ...
0
votes
2answers
46 views

Is it possible to have more than 1 sql databases in my wordpress blog?

I m watching video on installing wordpress manually. on first launch wordpress prompts you to input your sql database name, sql password etc. then i can start working from dashboard. is it ...
0
votes
2answers
88 views

Wordpress and a secondary database?

I have to achieve something on which I don't know how to approach it. Base of the issue: There's a bunch of data in another DB that I have to import into WP which so far wasn't possible due to them ...
10
votes
1answer
143 views

How can I make updates to a site, on a development copy, but then move updates back without overriding live site's evolving database?

I've tried to be as descriptive in the title as possible, and I know this question has been asked in before in various forms but I could not find good answer to it and it's are to imagine that no one ...
0
votes
0answers
33 views

Author ID mismatch from database

The author->ID for one particular author is returning a different value than what exists in the database. The database has the author's id as 2, but when I query author->ID, it returns the value 11. ...
1
vote
1answer
504 views

wpdb update add current timestamp not working

So using the $wpdb->update to add some data to a custom table, trying to add the current timestamp but it's not saving the right stuff(0000-00-00 00:00:00 this is saved). overview code ...
0
votes
1answer
135 views

How to access the WordPress DB from a plugin file

I'm building a basic video management plugin, with an embed feature that will have URLs like: mysite.com/wp-content/plugins/embed-video.php?video=[POST ID] I plan on using the [POST ID] url parameter ...
1
vote
0answers
59 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 ...
0
votes
1answer
27 views

Connecting to a 2nd DB gives me no results when querying

I'm trying to access a different DB on the same localhost as my wp db is and I did this like so: functions.php: add_action('init','my_new_db'); function my_new_db(){ $newdb = new wpdb( 'test', ...
1
vote
1answer
959 views

wpdb->insert multiple record at once

So after I have created the table 'settings-table' i want to add a couple of records to it. This is how I want to do it, not the best way, so I need a better way to do this because I will add more ...
0
votes
1answer
86 views

Searchable database of members using multiple criteria / filters

I'm very new to wp let's say that first! What I need is to create a site which will list a database of members of an organisation. Users will also be able to sign-up and add themselves to the ...
0
votes
1answer
31 views

Changing starting number of User ID

I've got a client who would like their online user registration to match their current database. Thus they'd like their wordpress sign ups to start with 00100, I can't seem to find a plugin that ...
0
votes
0answers
68 views

Add more tables under wp_term_taxonomy

How do I add default fields/columns in the taxonomy terms? I can add custom fields using plugins like ACF but I have no idea on how to query them from the database. I can query the name, slug, and ...
0
votes
0answers
65 views

Why this function not working for install database on plugin activation

I followed codex instructions from wordpress site but for some reason it's not working for me and i can't understand why is there any debug settings or options to activate to explain me where i go ...
0
votes
1answer
52 views

Save temporary registration data

I am working on a custom signup proces, where user first sign up with their name and email and after that they gonna add their company (a post in post type 'companies'). After they have signed up ...
0
votes
0answers
23 views

Incorporating Biology Database with Thousands of Records

I'm a WordPress newbie working on a Mac with MAMP. I have a series of database-driven websites that I'd like to incorporate into WordPress. My biggest website focuses on biology, especially animals. ...
0
votes
0answers
11 views

Configuration File Safety [duplicate]

I'm new to PHP and WordPress and I've a few questions to ask about database and configuration file security. I hope you answer them. When I try to reach some wp sites config file by typing ...
0
votes
0answers
105 views

Import Issue (ACF Repeater+WP Ultimate Importer)

I'm trying to import a bunch of data from my DB and there's plenty of fields, now i'm using advanced custom fields, repeaters to be specific. I had to make my own CSV file and I did this by exporting ...
4
votes
1answer
345 views

Using Vagrant for customizable Wordpress Multi-sites

Background: My partner and I have a goal to create a customizable vagrant project that uses Wordpress multi site, as a local development environment. Ideal Use Case: Various developers on our team ...
1
vote
1answer
38 views

Does auto_load to 'no' in wp_options improve performance

I am trying to improve the performance of a wordpress based blog. I am looking at wp_options table and am thinking to set the column auto_load to 'no'. Does it have any side-effect on the site ...
5
votes
2answers
596 views

What for is the table “wp_commentmeta” exactly?

I have been reading about the Database Description of Wordpress. I haven't understood the meaning to the use of the table wp_commentmeta. The documentation says: Each comment features information ...
0
votes
0answers
33 views

Category not displaying in add post, edit post, and categories page.

I have faced one problem after updating WordPress to 3.8.1. When I try to add or edit a post the category list at right side panel is blank, even though I have several categories on the site. Please ...
0
votes
0answers
291 views

Displaying database table in backend of wordpress

So basically I'm working on a job website for a client where they post jobs and users can apply for these jobs with a form that writes to the database with their inputed information.. I have set up a ...
0
votes
0answers
123 views

“Database Connection Error” upon install in Apache VirtualHost document root.. Why did this happen?

I have apache virtualhosts up and confirmed working. I want to install wordpress for one of the vhosts, so I unpacked all the wordpress files in the document root for that vhost. I proceeded to follow ...
0
votes
0answers
44 views

Transposh translation plugin querying wrong database

I've noticed my PHP error log growing very quickly, and it all seems to be a similar error: '[database name].wp_translations' doesn't exist However, the database it's trying to use is for a system ...
0
votes
1answer
81 views

Plugin data shared in Multisite

I am trying to build a site that very closely resembles another and so far so good with WordPress Multisite Networks. I am also using the plugin WP-FileBase - this plugin creates a database table per ...
3
votes
1answer
329 views

Solution for database version control and deployment?

Currently i use a dump script and commit the database to the git repo. --skip-extended-insert --skip-comments --skip-dump-date means that a diff can give me a fair idea of what has changed, but it ...