Questions tagged [mysql]

MySQL is an open-source, relational database management system.

Filter by
Sorted by
Tagged with
-1
votes
0answers
17 views

How can I upload information from an excel base to wordpress?

I have a database in excel with 600 documents, each of these documents, has its respective technical file and information, (if this data is helpful, the excel is in xls format and has 3 sheets which ...
0
votes
2answers
20 views

How can I fetch data from another website to my wordpress website with mysql database

I can make wordpress website but I have an issue with this. I want to fetch data from another third party website to my own wordpress site with the mysql database. I want to fetch only one table with ...
0
votes
0answers
27 views

Mysql + Wordpress is killing my server (huge CPU usage and getting slow) [closed]

I have recently installed wordpress in a production server with 80K fields in wp_users registered, 175K fields in wp_post table and 350K fields in wp_postmeta. Problem is that mysql database is ...
0
votes
0answers
11 views

Duplicate entry '0' for key 'PRIMARY' for query INSERT INTO `wp_terms`

I have a wordpress site that has been working well for the past 6 years. Recently, I have been getting errors on: user creation tag creation I realized that user creation was yielding Duplicate ...
0
votes
1answer
17 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
1answer
8 views

Extract all users along with yoast metadata description

We currently have a authors list page which shows all users which have at least 1 published post. Within this page I'd like to also show the description of the user, but take this from the metadata ...
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'...
-2
votes
0answers
35 views

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near More i would like to inform i'm using cpanel 7.1 php version. and ...
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
1answer
24 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
0answers
11 views

Checkbox that saves real-time value

Please help me as I create a checkbox that saves the value in real time and that appears on all pages if clicked or not. From already I thank you Sorry bad English <div class="toggle"> <...
-1
votes
1answer
19 views

$wpdb->get_var returns 0

I use following code to get a number : $where = 'WHERE type = 4 AND active = 1 AND user_id = ' . $user_id ; $user_followed = $wpdb->get_var("SELECT COUNT( * ) AS total FROM {$wpdb->tablex} {$...
0
votes
0answers
13 views

MySQL Actibity without any active visitors via Google Analytics

I am hosting a WP website on a VPS (Debian) and I noticed that my MySQL service is constantly being processed, even without any active live visitors that I can see on Google Analytics. I am aware ...
0
votes
0answers
12 views

Special character Wordpress search problem

i am faced with the following problem when using Wordpress Search. If i create a post titled "Try Something", with body "Hello testing t&y thank you". If i now take a look in my db, i see that ...
0
votes
0answers
24 views

Why is this function so slow?

My client has a WP website, its a real estate site with the properties setup as custom post types. Below is my search query to filter the listings based on a search form, all fairly standard stuff. ...
0
votes
0answers
17 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
29 views

The first load of the site is VERY SLOW (not related to cache)

Before I continue, I just want to mention that I search everywhere for solution and tried many many configurations and couldn't resolve the issue. I installed wordpress (on 3 different servers to ...
0
votes
1answer
22 views

create new users in db starting at what ID?

I have to create several hundred users using mysql. How do I know which user IDs to give them? I don't want to duplicate already-in-use IDs, so is there a way to check which IDs are safe to use for ...
0
votes
1answer
33 views

Update or insert meta key value - On Duplicate key update

I need to bulk update some meta descriptions and have found that some of the posts don't have them so I need to do an update or insert query. (Once I get this query right I will be creating a temp ...
0
votes
1answer
17 views

Delete a custom field in mysql for all posts with specific category id

Delete a custom field in mysql for all posts with specific category id I am trying to delete all custom fields with the key 'key1' from posts that are in category id '66'. I can delete all custom ...
1
vote
2answers
29 views

How can I free up the memory used by update_post_meta?

I've noticed that each call to update_post_meta results in a small increase in my memory usage. Normally, the increase is small enough to not matter. But I'm writing a CSV import function that calls ...
0
votes
0answers
22 views

Login issue in Wordpress

I'm facing currently an issue with my wordpress site, i don't know exactly what happened but when i try to login from /wp-admin i enter my password and i connect, but naturaly after the session dies i ...
1
vote
0answers
23 views

Return terms from multiple taxonomies using $wpdb

I would be the first to admit that I know next to nothing about SQL queries, but after numerous searches and some trial and error I was able to cobble together a query that returned the results I was ...
0
votes
1answer
25 views

Change upload URL by mime type

I'm working on a site that has several hundred pdf files uploaded over the course of a few months. All uploads are organised in the uploads directory by year/month. The client has just decided they ...
1
vote
3answers
66 views

$wpdb -> Batch insert from XML File?

Actually im stuck on this! XML-File ~ 140.000 Rows Filesize ~ 9.0 MB LOAD XML INFILE 'file_name' isnt't allowed ( shared hosting! ) The supplier provides a single XML file with quantity and sku. The ...
0
votes
1answer
7 views

Is a MySQL DATETIME or TIMESTAMP value retrieved through $wpdb in UTC?

I have a custom MySQL table with two columns that look like this: `timestamp_created` TIMESTAMP DEFAULT CURRENT_TIMESTAMP, `datetime_created` DATETIME DEFAULT CURRENT_TIMESTAMP, When retrieving ...
0
votes
0answers
39 views

Python Wordpress- ImportError on certain python modules

I created a custom plugin to execute python in wordpress as seen here: Running a python script within wordpress It works well mostly, except certain packages in the python script yields ImportError ...
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
0answers
17 views

Export Custom post + WPML

Hi everybody I have a Main wordpress with 500 custom post type, some of them are in Spanish, some of them in other language through WPML. I need to export them into a new wordpress, but I only ...
0
votes
2answers
31 views

Setting up Wordpress Locally on WAMP for a new site (with one already)

Here are the steps I took in downloading and setting up WordPress on a WAMP (Windows, Apache2, MySQL, PHP): 1.) Download WAMP Server, here: WAMP Server Installation 2.) Download WordPress on ...
0
votes
0answers
11 views

sql query page listing with option selected

I want to separate a page page from the sql query. for example current page and last page with option selected. my listing page code <ul class="list-group"> <h2 class="h3">...
0
votes
1answer
28 views

Get url of product's images (woocommerce)

What happen when a post (product) didnt have a guid,because it has the same image with another product ? For example: Query1: select guid from wp_posts where post_type='attachment' and ...
0
votes
0answers
81 views

PHP Fatal error: Uncaught Error: Call to a member function insert() on null

Hi I have an error that it's: Call to a member function insert() on null that the function $wpdb->insert(); returns. Now, this is my array:  Array ( [title] => Huqvarna 610 cross blocco ...
1
vote
0answers
51 views

Is it safe to convert tables from MyISAM to InnoDB?

I have inherited a WP site (with WP5.1 and WooCommerce 2.6.14, LearnDash 2.5.4 and few other smaller plugins). From screenshot you can see that it is a mix and match of MyISAM and InnoDB tables. ...
0
votes
1answer
45 views

PHP Warning: Error while sending QUERY packet

I have woocommerce website which give database error from 4-5 days. I checked the error log, the error is: PHP Warning: Error while sending QUERY packet. PID=31071 in /home/goldenwiggles/...
0
votes
1answer
31 views

Wordpress plugins for database queries

I have a handful of custom database commands that my admin users need to execute on an adhoc basis - it's some business logic that was unavailable in a normal plugin. The commands are all procedures ...
0
votes
1answer
66 views

PHP 7.2.18 | Your PHP installation appears to be missing the MySQL extension which is required by WordPress

I'm getting this message running PHP 7.2.18 Edit: If it makes any difference, when I run PHP from the command line using php -v, it says I'm running 7.3.5 I run this command to install: apt-get ...
0
votes
1answer
36 views

I can't update my data through $wpdb

I am trying to update my sql data through $wpdb, but can't... If anyone can help what's the real issue? $updated_version = $wpdb->update('wp_visitors', array('views' => $updated), array( '%d' ))...
0
votes
1answer
25 views

Trouble running $wpdb->query() with last_insert_id

I am trying to get a primary key from a coupon table to put it in my target table as a foreign key. In between I would like to run a query to get the last insert id. I can't get the syntax right ...
0
votes
1answer
23 views

A $_POST should occur when submit form but is not?

When I make a modification to data that is read into a form using MYSQL, I want to apply those changes to the database. But even when successfully submitting a form, the $_POST values are not ...
0
votes
0answers
8 views

avoid duplicate content after migration

I've done a full migration of two wordpress site (transferring bunch of blogs). I see that there are few blogs that have been repeated twice. Like, after moving old blogs from old to new sites along ...
1
vote
1answer
12 views

How can I perform high-level database merging for WordPress within continues delivery?

I've a bit of a problem. I'm currently trying to realize a WordPress development process regarding to one of my old question / topic: https://stackoverflow.com/questions/48890019/wordpress-...
0
votes
0answers
27 views

How to show galleries from a specific NextGEN album ID inside a custom WordPress page template?

I have a WordPress page template where all NextGEN galleries are displayed on a page: <?php global $nggdb; ?> <?php global $wpdb; ?> <?php $galleries = $nggdb->find_all_galleries('...
0
votes
1answer
20 views

Is it possible to create a WordPress table using array and loop?

I am trying to get all data fields name and data types from an array, but the query is not working. <?php $cr_table_array = array( array( 'data_field' => "id", 'data_type' => "mediumint(12) ...
0
votes
0answers
7 views

WordPress, WooCommerce wp-admin BackEnd work speed of response issue

Product Uploading: Limited by uploading 1000 products per instance, if more the process is freezing. The more uploaded products a vendor has the slower new products uploading speed. Product Uploading ...
0
votes
1answer
38 views

WordPress insert query is not working : Showing no Error

Can`t insert data of form into the table, I have also tried other ways. Below is the code. <?php /* Template Name: The custom email */ ?> <?php get_header(); ?> <?php $sql = "CREATE ...
0
votes
1answer
24 views

How to get INSERT errors from $wpdb?

I have these $wpdb->suppress_errors(false); $wpdb->show_errors (true); $wpdbp = $wpdb->prepare($preparedQuery->query, $preparedQuery->values); $result = $wpdb->...
0
votes
0answers
11 views

Character encoding issues on some text

I transitioned a website over to another host. I am having issues with the database. It is encoded in latin1 I believe. Here is the table: However, on the post excerpt, the text looks like this: ...
3
votes
1answer
64 views

Need MySQL Query or WP-CLI command to updates old URLs in Shortcodes [closed]

My client's website is moved from http to https, and I have updated most of the URLs using queries in phpMyAdmin, but I have been unable to update shortcode URLs. I have used the following query to ...
1
vote
2answers
155 views

Create Pages from Database

i've recently decided to create a website with wordpress. My goal is to a visualize data stored in a MySQL database. Each id in the database should represent one page on the website. From what i've ...