Title: Posts/pages corrupted
Last modified: August 21, 2016

---

# Posts/pages corrupted

 *  Resolved [Spikeeee](https://wordpress.org/support/users/spikeeee/)
 * (@spikeeee)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/postspages-corrupted/)
 * Hi
 * I have used your plugin successfully on many other websites. I’m about to take
   over and move a website to a new server. This time after moving the site I posts
   and pages are corrupted (showing ? in black diamond), when I go to edit these
   pages nothing is in the content editor, yet you can see the content on the page.
 * Corruption seems to lie when , . ‘ are used (these are replaced with the?)
 * Tried creating backups 9 times and same issues occur. Looking at the MySQL tables
   I cannot see any issues. I have also tried to repair the database, debug mode
   shows no issues with this.
 * Error log shows 3 DB Table Key errors, but these relate to a plugin and not to
   any posts.
 * Open Base Dir: is on and error before creation, no other issues are shown.
 * I’m at a loss please can someone provide pointers, thank you
 * [http://wordpress.org/plugins/duplicator/](http://wordpress.org/plugins/duplicator/)

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [Spikeeee](https://wordpress.org/support/users/spikeeee/)
 * (@spikeeee)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110068)
 * ha 3 days of trying to figure it out and as soon as I post I figure it out.
 * wp-config.php was missing the character set. If anyone experiances the same issue,
   open up the file and add the following two lines under where you login details
   are:
 * /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’,‘
   utf8’);
 * /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’,”);
 * Example:
 * define(‘DB_HOST’, ‘localhost’); // …and the server MySQL is running on
 * /** Database Charset to use in creating database tables. */
    define(‘DB_CHARSET’,‘
   utf8’);
 * /** The Database Collate type. Don’t change this if in doubt. */
    define(‘DB_COLLATE’,”);
 * /**#@+
    * Authentication Unique Keys and Salts.
 * Hope this helps someone else out 🙂
 * Tested solution 3 times and each time the above fixes it. For some reason the
   db was setting itself to Swedish which was causing the issues
 *  [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110222)
 * Hi Spikeeee,
    I have trouble understanding your solution, you just duplicated
   the 4 lines of code two times, without any modifications what so ever:
 *     ```
       /** Database Charset to use in creating database tables. */
       define('DB_CHARSET', 'utf8');
   
       /** The Database Collate type. Don't change this if in doubt. */
       define('DB_COLLATE', '');
       ```
   
 * Maybe you can rewrite your solution in a more explanatory manner? Thanks.
 * Also, if Duplicator is missing this setting, the authors should pick up on this
   and solve it as a bug.
 *  Thread Starter [Spikeeee](https://wordpress.org/support/users/spikeeee/)
 * (@spikeeee)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110223)
 * Apologies
 * wp-config.php was missing the lines telling WordPress what Character encoding
   it needed which are the following lines:
 *     ```
       /** Database Charset to use in creating database tables. */
       define('DB_CHARSET', 'utf8');
   
       /** The Database Collate type. Don't change this if in doubt. */
       define('DB_COLLATE', '');
       ```
   
 * Place the above information in your wp-config.php file, so you will need to download
   the file from the server using a FTP client (like Filezilla), edit it and then
   reupload it. Make sure you do not change anything in the file.
 * You want to add the lines underneath the MySQL database login and above the keys
   so between these two lines as an example of where you will be placing the data.
 * ** Example of where to place the code in your wp-config.php **
 *     ```
       define('DB_HOST', 'localhost'); // ...and the server MySQL is running on
   
       [ENTER THE TWO LINES HERE]
   
       /**#@+
       * Authentication Unique Keys and Salts.
       ```
   
 * I’m not sure if it matters where you place the lines, but looking at the config
   files on all my other installations this is where it is located.
 * Hopefully this is clearer?
 *  [bg17aw](https://wordpress.org/support/users/bg17aw/)
 * (@bg17aw)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110225)
 * Thank you! I have some swedish in my DB as well 🙂 So obviously I am a bit worried
   the same problem will happen to me.
 * However, I checked in the WP-CONFIG.PHP file and those lines are already in there
   from the first install of wordpress.
 * Seems like something happened to your particular wp-config file, as the lines
   were supposed to be in there from the start. Or am I missing something?
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110378)
 * Those items shouldn’t be updated by the plugin. There isn’t any logic right now
   that modifies the constants:
    DB_CHARSET or DB_COLLATE
 * Are you double sure they were their in the package.zip file?
 * Cheers~
 *  [dgdax](https://wordpress.org/support/users/dgdax/)
 * (@dgdax)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110444)
 * Was suffering a similar problem – accented characters and other marks being scrambled–
   so obviously a character set issue (migrating a site from WAMPP to hosted Unix)
 * Found the simplest solution inspired by another post: it’s the **database.sql**
   file that’s at fault:
 *  – open the ZIP file produced by Duplicator
    – open database.sql using editor(
   eg Notepad++) – change encoding to UTF8 (was created as ASCII) – update the ZIP,
   and then proceed as normal.
 * Spent a long time before coming across this solution – couldn’t Duplicator save
   the file with the correct encoding marks in the first place?
 * Otherwise, as many others have pointed out, it is an EXCELLENT plug-in!
 *  [Cory Lamle](https://wordpress.org/support/users/corylamleorg/)
 * (@corylamleorg)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110448)
 * Hey dgdax,
 * That is a good find! For others reading this thread you will need to look at 
   the CREATE TABLE statements at the top of the script and then change the following:
 * DEFAULT CHARSET=latin1;
    to DEFAULT CHARSET=UTF8;
 * Cheers~
 *  [dgdax](https://wordpress.org/support/users/dgdax/)
 * (@dgdax)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110449)
 * For info : I didn’t even do as much as that – I literally opened the database.
   sql file in Notepad++ and selected “Encode in UTF-8” from the Encoding menu, 
   without changing the contents at all.
 * This may in fact be more important than changing the DEFAULT CHARACTERSET, as
   it determines how the file is read by the system.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Posts/pages corrupted’ is closed to new replies.

 * ![](https://ps.w.org/duplicator/assets/icon-256x256.png?rev=2906985)
 * [Duplicator - Backups & Migration Plugin - Cloud Backups, Scheduled Backups, & More](https://wordpress.org/plugins/duplicator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/duplicator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/duplicator/)
 * [Active Topics](https://wordpress.org/support/plugin/duplicator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/duplicator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/duplicator/reviews/)

 * 8 replies
 * 4 participants
 * Last reply from: [dgdax](https://wordpress.org/support/users/dgdax/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/postspages-corrupted/#post-4110449)
 * Status: resolved