Questions tagged [database]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
18 views

How do I save data into a external database using wordpress [on hold]

I have inherited a number of php websites, including a few wordpress ones. I need to create a page that takes data submitted via contact form 7 and saves it out to an external DB. i have the DB and I ...
0
votes
1answer
34 views

Pages from custom table

I have custom table "catalog" inside wordpress database: id|name|description|slug|price I have template file "catalog" and page "Catalog" where i show all items from catalog table. But how i can ...
0
votes
0answers
13 views

mamp upgrade database backtrace error

I use MampPro to setup my sites on the local server... all well and good. So, every time I fire it up I get the upgrade nag... so, I figure its time, and hit the upgrade... and it does its thing. ...
0
votes
0answers
26 views

WooCommerce: /shop/ always redirects to homepage

When I define the shop URL (WooCommerce) as www.domain.tld/shop/ I always get redirected to the homepage (www.domain.tld) when trying to access www.domain.tld/shop/ (I receive a 302 redirect with x-...
1
vote
1answer
33 views

I am switching laptops. I host my WP server through MAMP. I want to transfer [on hold]

I am switching laptops. I host my WP server through MAMP. I want to transfer the entirety of my server to my new laptop so I can sell the old one. Should I just install mamp on my new MacBook & ...
0
votes
0answers
7 views

WordPress Deployment of new data

We have a WordPress site and we are looking for a way to port data updates from the staging environment to the live one. Say for example, we update the content on a page and we prepare it all on our ...
0
votes
1answer
30 views

Two WordPress sites sharing the same database

Here is what I'm looking to do. I would like to set up two WordPress sites. The one site will be the production and the other site will be the staging. What I'm trying to accomplish is to have the ...
0
votes
0answers
7 views

Reset views valors column of wp_post_meta

How can I update the column views values of the table wp_post_meta and leave them at 0? I have a plugin that shows the number of visits of a particular post and gets the information from that table ...
0
votes
1answer
23 views

Intermittent Yet Problematic Error - “Error Establishing A Database Connection”

👋 I know you have probably come across many a member here who complains of the following error: Error establishing a database connection This either means that the username and password ...
0
votes
1answer
21 views

WordPress site migration - locked out of admin area

I migrated my WordPress site by uploading the wp-content file from the original site to the new site and dumping the database of the old site onto the new one. However, this has resulted in me being ...
0
votes
0answers
14 views

Replace content in several posts: Embeded video code (shortcode) with a new video player code

I have a wordpress site using old video plugin called FLV Embed and i want to replace it with any new video player code or any other video plugin shortcode. Currently this plugin uses this shortcode ...
0
votes
0answers
20 views

How to create a custom SportsPress Pro scoresheet for fencing [on hold]

I am using SportsPress Pro for a fencing league but need to create a custom scoresheet for the Box Score to accurately capture all of the details required in a team match (see below). As a part of ...
0
votes
0answers
5 views

Store Featured Image in base64 string for Restful API

I am using WordPress' default REST API for posts. The app also needs images as base64 string. For this, I convert featured image to base64 on the fly. For example, in an API call, 10 posts are being ...
0
votes
0answers
24 views

Could not insert post into the database - Media

im currently having a database error in my Wordpress Media section. Everytime i upload a file i get a "Could not insert post into the database" error. The site was migrated from one hosting to ...
0
votes
2answers
20 views

How to Assign / Move all Deleted post to a category

I have a database of 50,000 articles, One of my categories contains post of 30k, I mistakenly Deleted a category that contains 30k Post, But all the posts still exist. I have search google for the ...
0
votes
0answers
6 views

Get items from woocommerce account page

I want to get all the menu items from the woocommerce account page. When we hook into woocommerce_account_menu_items filter, it passes an array of the menu items, I want this array but not the in the ...
0
votes
0answers
41 views

How to extend WP_query to a specific table?

I created a new table (named extrapage) in the wordpress database (named wpsite_db). I have added to this table some pages not published directly with wordpress and I want these pages to be considered ...
1
vote
1answer
11 views

Multisite setup creating custom table

If I'm running a multi-site setup and I create a new table and add it to the WordPress database, will it be accessible to all sites or is it created to be site specific?
0
votes
0answers
20 views

Get all top categories, then only 3 posts for each

I'm building a custom homepage that has that structure:  Cat 1 Post 1 | Post 2 | Post 3 Cat 1 Post 1 | Post 2 | Post 3 etc... I know how to get all top non-empty categories, loop through them ...
0
votes
0answers
25 views

Does WP-WooC support filters at database?

Is it possible for WP-WooCommerce to add to a database some direct filters with restriction conditions for example like: if (table_users.user_role<1) then (post_content="register to see")? Does WP-...
0
votes
1answer
19 views

Why does changing Database Table Prefixes result in loss of content?

As to add an additional layer of security, to an eCommerce website I am working on, I have changed the default Database prefix from wp_ to wp_additional_prefix. To do this, I opened the wp-config....
0
votes
0answers
20 views

How wordpress handle urls present in db for external wp-content directory

I have a site which I moved from one server to other. In source site the wp-content was external and maintained by hosting provided. After migrating it to new server I changed all the urls and ...
0
votes
0answers
11 views

Crate SQL view in WordPress database from custom post types and fields

I'm trying to create a mysql view inside WP database that selects and then show some custom post fields. E.g.: with custom post types Movies and Reviews create an SQL view with movies name, ID and it'...
0
votes
1answer
19 views

dynamic vue widget inside custom post

Im fairly new to WP development and am trying to create a plugin that generates a widget depending on the settings set in the custom post type. The widget is written in vue.js, and i would like to ...
0
votes
0answers
17 views

Store CPT 'Reviews' average ratings to a WordPress DB table or to a DB custom table?

I am working on this portal in which users can review the services (with description and rating) of a cultural place. BASICALLY, I created two Custom Post Types (CPT) with Pods, one is ...
0
votes
1answer
35 views

Best way to store 1 billion+ posts?

Hey there I am working on a site that collects a lot of data via scraping. For each data created i'm adding it to WP as a CPT. The problem is I'm going to reach around 1 billion rows eventually, and ...
0
votes
2answers
33 views

How to create multiple database tables on plugin activation?

I have an activation hook to create 2 new database tables that don't exist, only the second table is created from this code: public function add_tables() { // Global $wpdb ...
-1
votes
1answer
28 views

Showing Error(TAble already exist)

-- -- Database: 25backup2019 -- -- Table structure for table wp_commentmeta CREATE TABLE wp_commentmeta ( meta_id bigint(20) UNSIGNED NOT NULL, comment_id bigint(20) UNSIGNED NOT NULL DEFAULT '...
0
votes
1answer
18 views

Two different wordpress sites - same server and IP address. Gaining Access to database 1 of 2

Bit of an unusual request. I have a series of individual wordpress websites. they are not a multisite, as I need each to have unique domain names for the various sections of network. What I want to ...
0
votes
2answers
40 views

Connecting to external oracle database

So I'm trying to connect to an external db in order to access/update information located on a different non-wordpress database (oracle). I tried constructing a new wpdb object (as suggested by many ...
0
votes
1answer
30 views

Fix wp_term_relationships slow query in get_posts

I used the Query Monitor plugin to find slow query on my WordPress site. The below-mentioned WP_Query->get_posts() takes about 0.3446 query time out of the total Database Query time of 0.3976. ...
0
votes
1answer
32 views

Having all “non-PHP” files on a different server

I would like to seperate my .php files from all the other files (images, scripts etc.) wordpress uses. So I put them on different servers. I can make the files known to my wordpress site by simply ...
0
votes
0answers
22 views

Remove special characters from filenames

I have a website that i transfered recently from one host to another. Unfortunately when i did that, i noticed that all the images that had special characters in it lik (é, è, à, ...) weren't showing ...
0
votes
0answers
13 views

Lead capture offering download via WordPress + Amazon SES

Is it possible to integrate WordPress with Amazon SES this way? I want to collect lead e-mails by providing items to download (e-books, podcasts and other stuff). The flow is: user leaves his mail,...
0
votes
0answers
13 views

Voting system database connection

I am trying to implement a polls plugin in WordPress. I have to import previous questions and answers from previous polls existing in a database and implement new questionnaires and voting systems. I ...
0
votes
0answers
18 views

Code to insert TAG taxonomy Wordpress

I made a grave error. I delete many TAGs from the database of my blog. Many TAGs were orphaned. And yet, unfortunately, many posts have anchor words that link to deleted tags. That is, several links ...
0
votes
0answers
34 views

Translating WP query into to SQL query

I have very complex wp query and I want to use sql query instead of this. Is there any way to translate wp query to sql query. I am thinking that I will have a better control over sql query as the wp ...
0
votes
0answers
24 views

Accessing an external database

I manage a web site for a charity. We are in the process of moving from WebPlus (no longer supported by Serif) to WordPress. Once the move is complete I would like to introduce a database of members,...
0
votes
1answer
24 views

How can I UN-orphan media files?

Something wrecked a non-profit WordPress site I'm responsible for (I'm not a WP expert, just the most technical of all our volunteers). I was able to restore most of it from a backup, but the ...
0
votes
0answers
19 views

WPSiteSync & Advanced Custom Fields

I'm using the plugin WPSiteSync which can copy posts from one wordpress install to another. It works well however I’m using Advanced Custom Fields with a Relationship field. When it copies over posts ...
0
votes
0answers
32 views

Accessing data from Google Cloud Datastore in Wordpress site

I want to access data stored in Google Cloud Datastore (or possibly other Google database option) in my Wordpress site. I have tried to find information about this without much luck. The alternatives ...
0
votes
2answers
20 views

Can I use a wpdb object to connect to a non-Wordpress Oracle database [duplicate]

I simply have a quick question. I've found information related to this, but I'm not completely sure if this is possible. I know that I can create a second database connection using the wpdb object as ...
3
votes
2answers
65 views

How to deploy a new theme/theme options from staging to production site

Let's say you are building a new theme on a staging site. While you were building, the production database has changed due to new user registrations/orders. So now the question becomes how do you ...
0
votes
1answer
23 views

How retreive saved data from gravity forms in my template?

I want to display the completed gravity form values in frontpage using entry id and form id. I know about this but unable to retrieve values GFFormsModel::get_leads($form_id) returns a list of ...
0
votes
1answer
14 views

syntax error for changing user role from database

I want to change user role from the database, UPDATE wp_usermeta SET meta_value = 'a:1:{s:10:"subscriber";b:1;}' WHERE meta_key = 'wp_capabilities' AND meta_value = 'a:1:{s:9:"wpas_user";b:1;}'; ...
0
votes
0answers
24 views

Database Query not accepting my WHERE LIKE wildcard in my PHP code?

I have a query that works fine when I run it in PHPMyAdmin, but does not return anything when ran via the website form post. I copy and paste the exact SELECT below, replace both$searchByText and $...
0
votes
0answers
11 views

Creating a custom search form for custom data NOT for custom fields, categories, taxonomies

How to create a searchable database with a single-field search box in the front end? I have a client who is announcing a recall of one of its products. They are looking to have a single-field search ...
0
votes
0answers
34 views

Optimize WP site for millions of posts

I have a news portal Using WP cms, It has around 90K posts. DB size 2GB. Used Apache, ngnix, WP Memory Limit 4096M, Time 300 Sec, Using CDN :) I am using 2 Dedicated servers E5 2650 V4, 96GB Ram. ...
0
votes
1answer
28 views

Changing root password in PHPMyAdmin for Wordpress Database when going live

Is it a good idea to create a password and make your password secure for your Wordpress database when uploading the database to a third-party web host (going live instead of hosting on localhost) ...
0
votes
1answer
71 views

Advice on how to structure a custom plugin

I am attempting to create a custom plugin and would like some advice/ideas on how best to store the data. Expected Posts ~ 1,000 Expected Users ~ 10,000 Each user will need to have at least one ...