Set page template for all pages?

EDIT As noted in the comments on your question, the best approach would just be to edit your page.php file. If you want ALL of your pages to have the same page template, and not have to do anything extra to set it that way, it’s quite obvious why this is a good idea. 🙂 … Read more

Complex meta query with 3 keys

The culprit The culprit of the matter is meta queries not supporting different and/or nested relations – a shortcoming by the way, that has driven me nuts before as well. In a recent instance with a search scenario also. What you want to do simply cannot be accomplished with WP_Query as well as one loop … Read more

Mysqldump add drop table?

It only affects the output of your MySQL dump in the file that is created. It isn’t necessary. It is just there so that if you import the created dump file into a database that already has a table with the same name, it will drop that table and then add the new table in … Read more

WordPress mysqli and PDO

WordPress uses mysql_* functions. http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/wp-db.php It has used those ever since I can remember, which probably answers your last question. It is what I would consider legacy code. I suspect it will be updated sometime soon (those functions were only deprecated as of PHP 5.5, I believe). I don’t know which route development will go. … Read more

How to replace the domain name in a WordPress database?

Want to improve this post? Provide detailed answers to this question, including citations and an explanation of why your answer is correct. Answers without enough detail may be edited or deleted. The data you’re looking at is not JSON formatted. JSON doesn’t (normally) store value types and lengths like that. What you’re looking at is … Read more

What SQL Query to do a simple find and replace

The table where your URL is saved is wp_options. You should do an update on the columns that use the URL for your site: UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “siteurl” UPDATE TABLE wp_options SET option_value = “new domain” WHERE option_name = “home” I might be missing some value, but … Read more