Articles of database

How to migrate the posts from an old custom legacy blog to a new WordPress website?

I have to migrate the posts of a very old custom legacy blog made in ASP (the posts are stored in a MySql table) into a new WordPress blog. So I need your help to find the smartest solution to do it, I rule out the idea of ​​doing it manually because the number of […]

Insert posts in two tables

Is there a possibility to split the wp_posts table into two tables? I have a huge wp_posts table, so idea is to move the older posts to wp_posts_1 and insert posts only created in the current year into wp_posts_2

Change all http to https in mysql databse?

I am trying to change all images links from http to https, is it possible doing that on a batch query working on the whole database? How? Moreover my provider made a mess adding an “s” to https getting useless and wrong “httpss” ! So I must revert them from httpss to https. Please help, […]

What are terms and taxonomy, how they related to post and how these three are stored in database?

I want to understand terms and taxonomy in WordPress. My questions: What are the terms and taxonomy in wordpress? How terms and taxonomy relates to post and how post, terms, taxonomy are stored in database ? What is the relationship between these three ? My actual problem: I have a site of real estate agency, […]

Change setting name in Customizer and keep the data

I created a theme while back when I was new to Customizer API and for some weird reasons I named theme settings as: $wp_customize->add_setting(‘thefunk_theme_options[header_color] Instead of just header_color and saved every setting in an array like thefunk_theme_options[header_color] So I recently found out that it’s generating some issues, so I want to save every setting, let’s […]

error establishing a database connection

I know this question is asked like a million times, but I can’t find an answer for my problem. This problem is happening in a user of my server (my father’s blog actually), and as he told me: “Just finished a post and was editing the text and the image layout when the site froze. […]

Importing posts from old website to new conflicting post ID's?

I am wondering when I am importing posts from my old site into my new website, which has already some posts in it. Do the imported posts get a new ID or do they overrule the existing posts ID’s?

How to prevent WordPress from retrieving data for the last 10 posts in the database?

According to the Query Monitor plugin, WordPress is calling four queries for the last 10 posts in the database, starting with this to know the IDs: SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND wp_posts.post_type = ‘post’ AND (wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘private’) ORDER BY wp_posts.post_date DESC LIMIT 0, 10 The below and […]

Leader board for game on homepage

I’ve built a simple game which is housed on my homepage. I’d like to create a leader board (a small results table) which displays the top three 3 scores. How would i insert/retrieve the score data into and from my DB? The games been coded using JS, is there wordpress php functions that would help […]

Help running a MySQL query to update all wp_#_options tables in a Multisite install

I’d like to run a query through my WordPress database that updates the blog_public values on all individual sites. I’m stuck on how to have the statement look for wp_2_options, wp_3_options, etc. I can do it individually with something like this: UPDATE wp_10_options SET option_value = REPLACE(option_value, ‘1’, ‘0’) But am stuck on how to […]