{"id":32043,"date":"2025-01-29T18:10:34","date_gmt":"2025-01-29T17:10:34","guid":{"rendered":"https:\/\/mainetcare.de\/?p=32043"},"modified":"2025-02-25T14:52:26","modified_gmt":"2025-02-25T13:52:26","slug":"how-do-i-fix-the-error-in-the-gutenberg-editor-update-failed-or-publish-failed","status":"publish","type":"post","link":"https:\/\/mainetcare.de\/en\/wie-behebe-ich-den-fehler-im-gutenberg-editor-aktualisierung-fehlgeschlagen-bzw-veroeffentlichung-fehlgeschlagen\/","title":{"rendered":"How do I fix the error in the Gutenberg editor \"Update failed\" or \"Publishing failed\"?"},"content":{"rendered":"<p class=\"wp-block-paragraph\">If you receive the error message \"Update failed\" or \"Publish failed\" when saving or publishing a post in the WordPress Gutenberg editor and your text contains special characters such as emoticons, this could be due to an incorrect database configuration \ud83d\ude40! <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this article, I will show you step by step how to fix the problem.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cause of the problem: Is the character set correct?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The character set <code>utf8mb3<\/code> (or also <code>utf8<\/code> ) only supports characters with up to <strong>three bytes<\/strong>. However, emojis and many special characters require <strong>four bytes<\/strong>. If your WordPress database is still on <code>utf8mb3<\/code> is set, saving an emoticon will result in an error message.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Solution: Conversion of the database to utf8mb4<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Backup!!!! <\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">As always, before operating on database structures, create a complete backup of your database. We assume that you have access to the \"PHPMyAdmin\" tool.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Log in to phpMyAdmin.<\/li>\n\n\n\n<li>Select the affected database.<\/li>\n\n\n\n<li>Click above on <strong>\"Export\"<\/strong>.<\/li>\n\n\n\n<li>Select the \"Quick\" option and click on <strong>\"OK\"<\/strong>to download the SQL file.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Check the character set of the database<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open phpMyAdmin and select your WordPress database.<\/li>\n\n\n\n<li>Go to the tab <strong>\"Operations\"<\/strong>.<\/li>\n\n\n\n<li>Check under <strong>\"Collation\"<\/strong>whether the character set <code>utf8mb3_general_ci<\/code> or another obsolete character set is used.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full width--20\"><img loading=\"lazy\" decoding=\"async\" width=\"912\" height=\"2342\" src=\"https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1.jpg\" alt=\"\" class=\"wp-image-32044\" style=\"object-fit:cover\" srcset=\"https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1.jpg 912w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-598x1536.jpg 598w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-798x2048.jpg 798w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-748x1920.jpg 748w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-374x960.jpg 374w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-187x480.jpg 187w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/aktualisieren-fehlgeschlagen-emoticon-1-93x240.jpg 93w\" sizes=\"auto, (max-width: 912px) 100vw, 912px\" \/><figcaption class=\"wp-element-caption\">This database still has the old character set<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Change character set<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Change database character set<\/strong><\/h4>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Select the tab <strong>\"Operations\"<\/strong> the new character set <code>utf8mb4_unicode_ci<\/code> from.<\/li>\n\n\n\n<li>Activate the option <strong>\"Change collation for all tables\"<\/strong> and click on <strong>\"OK\"<\/strong>.<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"486\" src=\"https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/cannot-update-or-insert-emoticon.jpg\" alt=\"\" class=\"wp-image-32045\" srcset=\"https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/cannot-update-or-insert-emoticon.jpg 768w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/cannot-update-or-insert-emoticon-480x304.jpg 480w, https:\/\/mainetcare.de\/wp-content\/uploads\/2025\/01\/cannot-update-or-insert-emoticon-240x152.jpg 240w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><figcaption class=\"wp-element-caption\">Check the \"Change all table collations\" and \"Change all column collations\" boxes<\/figcaption><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">If not all tables or columns have been automatically adapted to the new character set<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go back to the overview of your tables.<\/li>\n\n\n\n<li>Click on a table (e.g. <code>wp_posts<\/code>) and open the tab <strong>\"Operations\"<\/strong>.<\/li>\n\n\n\n<li>Change the character set to <code>utf8mb4_unicode_ci<\/code>.<\/li>\n\n\n\n<li>Repeat this step for all relevant tables (e.g. <code>wp_comments<\/code>, <code>wp_options<\/code>).<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">Sometimes individual columns need to be adjusted:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the table and go to the tab <strong>\"Structure\"<\/strong>.<\/li>\n\n\n\n<li>Edit columns with text content (e.g. <code>post_content<\/code>, <code>post_title<\/code>) and change their collation to <code>utf8mb4_unicode_ci<\/code>.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Customize the WordPress configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure that your file <code>wp-config.php<\/code> specifies the correct character set:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the file <code>wp-config.php<\/code> in the root directory of your WordPress installation.<\/li>\n\n\n\n<li>Search for or complete the following lines:<\/li>\n<\/ol>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"JavaScript\" data-shcb-language-slug=\"javascript\"><span><code class=\"hljs language-javascript\">   define(<span class=\"hljs-string\">DB_CHARSET'<\/span>, <span class=\"hljs-string\">'utf8mb4'<\/span>);\n   define(<span class=\"hljs-string\">DB_COLLATE'<\/span>, <span class=\"hljs-string\">'utf8mb4_unicode_ci'<\/span>);<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">JavaScript<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">javascript<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<ol start=\"3\" class=\"wp-block-list\">\n<li>Save and upload the file again.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">5. reminder: clear cache \/ reload editor<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Clear the cache of your website (if available) and the browser cache to ensure that the changes take effect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If your Gutenberg editor is still open, reload the article using the \"Refresh\" function of your web browser<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Check whether the problem has been resolved<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Now try again to save or publish a post with emojis or special characters:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Open the Gutenberg editor and insert an emoji into a paragraph.<\/li>\n\n\n\n<li>Save or publish the post.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">If everything has been done correctly, the problem should be solved.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The error message \"Update failed\" in the Gutenberg editor can be caused by an outdated database configuration, in particular the character set <code>utf8mb3<\/code>. With the changeover to <code>utf8mb4<\/code> not only ensure that emojis are supported, but also make your website future-proof.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\ud83e\udd16<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And if all this is too much effort for you, then simply call a website gardener \ud83d\udc69\u200d\ud83c\udf3e<\/p>","protected":false},"excerpt":{"rendered":"<p>If you receive the error message \"Update failed\" or \"Publish failed\" when saving a post in the WordPress Gutenberg editor, this could be due to an incorrect database configuration. The solution is as follows...<\/p>","protected":false},"author":1,"featured_media":32046,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[22],"tags":[],"techdoc_tag":[],"class_list":["post-32043","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-website-pflege"],"acf":[],"_links":{"self":[{"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/posts\/32043","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/comments?post=32043"}],"version-history":[{"count":2,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/posts\/32043\/revisions"}],"predecessor-version":[{"id":32173,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/posts\/32043\/revisions\/32173"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/media\/32046"}],"wp:attachment":[{"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/media?parent=32043"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/categories?post=32043"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/tags?post=32043"},{"taxonomy":"techdoc_tag","embeddable":true,"href":"https:\/\/mainetcare.de\/en\/wp-json\/wp\/v2\/techdoc_tag?post=32043"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}