Try deactivating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.
If that does not resolve the issue, try switching to the Twenty Sixteen theme to rule-out a theme-specific issue (theme functions can interfere like plugins).
Just tried both but no luck. The post content is still blank. The pages show the content fine though which means it’s in the database. It’s just not showing in the backend.
It worked fine on the development domain.
I fixed both of these by changing
define(‘DB_CHARSET’, ‘utf8mb4’); in WP-CONFIG.php
to
define(‘DB_CHARSET’, ‘utf8’);
Weird, let’s just rule-out core file corruption to be sure.
Try downloading WordPress again, access your server via SFTP or FTP, or a file manager in your hosting account’s control panel, and delete then replace your copies of everything on the server except the wp-config.php file and the /wp-content/ directory with fresh copies from the download. This will effectively replace all of your core files without damaging your content and settings.
Some uploaders tend to be unreliable when overwriting files, so don’t forget to delete the original files before replacing them.
Whoops, our replies crossed.
That’s an interesting fix, I’m glad it worked!
Were you using utf8mb4 on the development site?
I think WordPress seems to use utf8mb4 automatically and then when I switched DataBases I used utf8 so that probably caused the problem.
It should use that automatically, unless initially forced to utf8, which is why I was wondering if the development site was set to that too.
But yes, it does sounds like the existing database charset is the problem.
If you want to change that, follow this guide: https://pento.net/2014/04/07/wordpress-and-utf-8/
And, don’t forget to backup first: https://codex.wordpress.org/WordPress_Backups
Thanks! I’ll use that today to get it working with utf8mb4.
Thanks π
Not working.
show variables like “character_set_database”;
shows “utf8mb4”
My tables encoding is utf8mb4
My tables collation is utf8mb4_unicode_ci
WP-CONFIG.PHP has:
/** Database Charset to use in creating database tables. */
define('DB_CHARSET', 'utf8mb4');
/** The Database Collate type. Don't change this if in doubt. */
define('DB_COLLATE', '');
Which causes the same initial problem. Changing it to utf8 works again.
my.cnf has the following in the mysqld section
default-storage-engine=InnoDB
innodb-file-format=barracuda
innodb-file-per-table=true
innodb-large-prefix=true
collation-server=utf8mb4_unicode_ci
character-set-server=utf8mb4
Any ideas?
Hm, so databases are a type of thing that I think is best to not mess with too much.
If the above didn’t work, and if it still works just fine as utf8, then probably best to just stick with utf8.
I’m a dare devil!
Got it working by following this: https://mathiasbynens.be/notes/mysql-utf8mb4
Thanks for the guidance and help π