Understanding custom php that reads from WP MYSQL

Have you looked at the server log files (MySQL and PHP)? It could be several things: A MySQL permission issue on the db and/or table Table is named differently than stated in your code MySQL and/or WordPress are using older versions that don’t support certain syntax

Create pages from MySQL database

You really should dive in more yourself. I’m not sure how good of a programmer you are, but you almost certain have to start to write a script that extracts all the information you want from the database and put this in an array. Once you’ve done that, you can use this data to create … Read more

Array Formation Issue

There a few things going on here. First, you’re getting back a multidimensional array (array of arrays) where the nested arrays have column names as keys. The reason for this is your use of the ARRAY_A parameter. You can read about the output types in the codex entry. You may be just fine using the … Read more

MySQL query for taxonomy-meta

Try select t.name, t.slug, tm.meta_key, tm.meta_value from wp_term_taxonomy AS tt inner join wp_terms AS t ON tt.term_id = t.term_id inner join wp_termmeta AS tm ON t.term_id = tm.term_id where tt.taxonomy = ‘census-tract’ order by t.name

mysqldump to a tar.gz

mysqldump –opt <database> | gzip -c | ssh user@wherever ‘cat > /tmp/yourfile.sql.gz’ You can’t use tar in a pipe like this, and you don’t need it anyway, as you’re only outputting a single file. tar is only useful if you have multiple files.

Some Post Content Does Not Show Up In DB Search

WordPress store the content from the editor inside the table post_content. But if you use additional plugins for your editor it is possible to store on different places, like custom tables and also in post_meta, really popular for third plugins to store date there use the meta API. Small hint, maybe you should use a … Read more

Same database; different WordPress

You need to set the WP_SITEURL and WP_HOME in domainB.com’s wp-config.php file. Please add below code. define(‘WP_SITEURL’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); define(‘WP_HOME’, ‘http://’ . $_SERVER[‘HTTP_HOST’]); In your server SSL setup then used below code define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’]); define(‘WP_HOME’, ‘https://’ . $_SERVER[‘HTTP_HOST’]);