How to stop WordPress using utf8mb4_unicode_520_ci collation?
Not using utf8mb4_unicode…. collation and using a utf8 one instead is a security problem. The right answer is to upgrade your sites and DBs so they all use utf8mb4
Not using utf8mb4_unicode…. collation and using a utf8 one instead is a security problem. The right answer is to upgrade your sites and DBs so they all use utf8mb4
MyISAM locks the whole page for writes and is not ACID compliant, while InnoDB sticks to locking rows as you point out, and is ACID compliant. This makes it sturdier when you’ve a lot of writes, as in faster and less prone to data corruption. It’s slower for reads in my experience, though it handles … Read more
Custom post types are an excellent way for this kind of a job. I’d suggest reading the following info: Custom Post Types (1) (2) Taxonomies (1) (2) Custom Meta Boxes (1) – I use this class all the time, or (2) If you are new to Custom post types, an easy way to start would … Read more
There is a significant amount of memory usage if you use the $wpdb for queries that return very large result sets. $wpdb loads the entire results from any given query into memory. So if you’re, say, selecting all the posts, then it’ll try to load the whole thing into memory immediately. So for something like … Read more
In custom tables you do whatever you want. If a view is what you need, use it. However, you might consider separating the code in an exporter. See wp-admin/includes/export.php for a start. If you keep the actual SQL and the export format separate you can: create a new exporter for another table structure easily use … Read more
It’s used by wordpress core for parsing RSS & Atom feeds. You probably know that wordpress puts all plugins and themes into the wp-content folder so that you don’t need to worry about any other folders/files. Leave it be.
You can use wpdb insert function. It’s better in every way. It can care about data’s escapeing itself and it’s shorter. You can use your own query anyway but I would recommended this article for reading https://codex.wordpress.org/Data_Validation#Database
The two variables $name and $email are unknown inside the function. You have to make them globally available inside it by changing global $wpdb into global $wpdb, $name, $email: require_once(‘../../../wp-load.php’); /** * After t f’s comment about putting global before the variable. * Not necessary (http://php.net/manual/en/language.variables.scope.php) */ global $name = $_POST[‘name’]; global $email = $_POST[’email’]; … Read more
The problem If the table already exists your code will still try to execute the following queries: 1) ALTER TABLE wp_voicemail_call CHANGE COLUMN user_id user_id BIGINT(9) UNSIGNED NOT NULL 2) ALTER TABLE wp_voicemail_call CHANGE COLUMN call_id call_id BIGINT(9) UNSIGNED NOT NULL 3) ALTER TABLE wp_voicemail_call CHANGE COLUMN opened opened BOOL DEFAULT 0 NOT NULL 4) … Read more
Uh oh, that’s an important table. You might have lost a bunch of options, but you can still repair the database. WordPress allows a repair mode, which you can repair the database. Open the wp-config.php file using FTP, and add this line before the ABSPATH: define( ‘WP_ALLOW_REPAIR’, true ); now head over to : http://yourdomain.com/wp-admin/maint/repair.php … Read more