WordPress mysql table double prefixes

1) In order to check what kind of prefix used by current installantion you can goto wp-config.php in a root directory and find line with $table_prefix = ‘PREFIX_HERE’; variable 2) Backup the DB before making any action! 3) Additionally check if other tables with different prefixes/name_patters are not used by badly-written 3rd party plugins. They … Read more

writing inner join in wpdb

thanks for your time and thanks to @czerspalace I started the query with double quotation and then separate it with a single quotation and after looking at the echo output I found that there’s no spaces between From and table name this is the correct way $pending_reservations = $wpdb->get_results(‘ SELECT booking_calendars.cal_name FROM ‘.$wpdb->prefix.’booking_calendars AS booking_calendars … Read more

Error: SELECT SQL_CALC_FOUND_ROWS

This wouldn’t be caused by a change in the database. What the error refers to is this: SELECT SQL_CALC_FOUND_ROWS wp_posts.id FROM wp_posts WHERE 1 = 1 AND 0 GROUP BY wp_posts.id ORDER BY wp_postmeta.meta_value + 0 DESC, wp_posts.post_date DESC LIMIT 0, 10 Your code only includes data from the wp_posts table (second line above) but … Read more

Moving to another host; which tables to move in a database

I never personally tried this, but your images and posts reside in your {prefix}posts (wp_posts) table. I would also copy {prefix}postmeta (wp_postmeta) over. So copying over those table should do what you want. Keep in mind that this won’t copy your categories and tags (meta), and your comments (comments) they reside in other tables, you … Read more

WordPress Install and Database on separate hosting?

Yes – absolutely. Simply enter the appropriate hostname and credentials in wp-config.php. Instead of the default localhost use the hostname provided by your database provider. Example: define( ‘DB_HOST’, ‘mysql.example.com:3307’ ); https://codex.wordpress.org/Editing_wp-config.php#Set_Database_Host