Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mysql]

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

0
votes
0answers
20 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
10 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
0answers
13 views

How do I create a column in the ‘ Post Meta ‘ in PHP or plugin?

How do I create a column in the ‘ Post Meta ‘ in PHP or plugin? function new_column_postmeta() { CREATE TABLE IF NOT EXISTS <code>wp_postmeta</code> ( <code>meta_id</code> ...
0
votes
0answers
3 views

Fatal error: Call to a member function get() on null in C:\appserv\www\Cocolani\php\req\register.php on line 4 [migrated]

I'm from Egypt so I apologize for my bad language I'm still a beginner programmer , so I hope you give the solution step by step. I'm trying to make a private server for a flash game and i have a ...
0
votes
1answer
22 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
14 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
24 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
21 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
0answers
18 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
49 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
4 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
19 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
26 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
16 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
53 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
17 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
34 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
25 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
49 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
31 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
18 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
25 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
37 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
21 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
10 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
145 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 ...
2
votes
1answer
51 views

Get WooCommerce product details and transfer them to a custom DB table

I'm currently doing a registering service for products with WordPress and WooCommerce. All products that customers can register will be in the WooCommerce database, but not visible on frontend. Here ...
0
votes
1answer
23 views

Delete all user's meta without knowing all the 'key'

Trying to delete users from the frontend - which I currently have working. Previously, I was manually deleting the metadata when it was completed. I was looking to see if it was possible to delete ...
0
votes
0answers
18 views

WordPress User Search Based on Latitude and Longitude

I am working on a project for myself whereby I am trying to search users within the WordPress database based on postcode/zip and radius but the code which I'm using takes forever to load and results ...
0
votes
0answers
8 views

Woocommerce web site 6-7 second pageloads

I have a wordpress based ecommerce website with Woocommerce. I use WP-Rocket Plugin for cache I use CND I use a Cloud dedicated server : 9CPU X 2GHZ 7GB Ram Apache For cached page ...
1
vote
0answers
20 views

How can I save unique user data on my site? [closed]

I am trying to find a way to allow registered users on my site create lists of data and save them. I'm having trouble finding a way to save the list they create to the database of my site. I am ...
1
vote
2answers
28 views

Removing a wordpress multisite installation and preserving the database before migrate to nginx

I have a WordPress multisite installation, and I need to remove the multisite, and keeps just the site ID 5 (domain.com/br) in the main address (domain.com). So I follow this tutorial to remove ...
0
votes
1answer
20 views

I would like some help wth an SQL query to link posts with categories

I am extracting data from my Wordpress database to analyse site structure. Works pretty good so far but I would like to include the posts main category in the table to enable further analysis. This is ...
0
votes
0answers
34 views

Wordpress Query optimaization for slow query

I've WP installation with some 120K posts. One of the slow queries that frequently appear at @mysql-slow.log is below # Query_time: 1.744827 Lock_time: 0.000567 Rows_sent: 1 Rows_examined: 635732 ...
0
votes
0answers
22 views

how can i solve this problem? “wp_termmeta' doesn't exist for query SELECT term_id, meta_key…”

I do not know much about DATABASE. I am just a blogger. Two weeks ago, my blog is totally fine. but when I tried to pots new post, or when I tried to open existed post on homepage, I cannot post, or ...
0
votes
0answers
27 views

autocomplete in wordpress using ajax with json-data

The scenario is whenever client press the key, automatically the suggestion should come below the text box, and that suggested value is fetched from the database. Here i am stucked in a situation ...
0
votes
2answers
55 views

Way to bulk make all my tags lowercase?

Is there a way in mySQL or otherwise to bulk convert all my tags into lowercase? Thanks!
0
votes
0answers
28 views

MYSQL SQL syntax error on Wordpress Posts page

I see the following error on my Wordpress Posts page when I enable debugging. I only noticed this when I started adding categories to my posts and they were not saving. I never used categories before, ...
0
votes
1answer
53 views

Error inserting into custom table - Object of class wpdb could not be converted to string [closed]

Getting the above error when trying to insert into custom table .I am unable to find out what is the cause of the error. The error comes at line 17. Any help is greatly appreicated. The code is ...
1
vote
0answers
40 views

How to delete all customer user account that haven't placed a single order?

Recently I've had an influx of spam users registering on my Wordpress website and I am trying to delete them all if: they have a "Customer" role haven't placed at least one order before As I could ...