Skip to main content
3 votes

How does wordpress link columns from different tables without using FOREIGN KEY or JOIN?

It doesn't. WordPress doesn't use foreign keys to link tables together that way. There are also lots and lots of other reasons to declare keys and primary keys in a table that have nothing to do with ...
Tom J Nowell's user avatar
  • 59.6k
2 votes

How can I (partially) restore a Wordpress website from a SQL file?

This definitely is possible. You won't be able to get your media back with just the sql file but you can get your content. Assuming this is your content and you have a proper admin account this is ...
rudtek's user avatar
  • 6,143
2 votes

"#1067 - Invalid default value for 'post_date'" when trying to reset AI after backup

First run ALTER TABLE `wp_posts` CHANGE `post_date` `post_date` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, CHANGE `post_date_gmt` `post_date_gmt` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP, ...
Hari's user avatar
  • 21
1 vote
Accepted

How to get a list of all posts and their categories?

If you want to export the data to a CSV or JSON file directly from the SQL query, you can use the MySQL INTO OUTFILE clause. SELECT wpd9_posts.post_title, GROUP_CONCAT(wpd9_terms.name) AS categories ...
vijay pancholi's user avatar
1 vote
Accepted

Possible SQL injection. How to locate and fix?

It was not a SQL injection, but spam links in cache indeed. What happened was, the cache plugin was set not to cache search pages, but due to some glitch it was caching them anyway. The problem with ...
location's user avatar
1 vote

"#1067 - Invalid default value for 'post_date'" when trying to reset AI after backup

The answer of Carlos Faria is perfect ! But here is a small code you can use if you are on PhpMyAdmin and doesn't want to mess with the SQL configuration. Here I gonna change the sql_mode value but ...
Pierre R's user avatar
  • 232

Only top scored, non community-wiki answers of a minimum length are eligible