Case Study

The migration tool blamed the character set, but a map plugin's table was what stopped the database restore

During a move between two Plesk servers, the migration tool failed to copy one WordPress database and reported a character decoding error. When we restored the database by hand, MariaDB gave a different answer: it could not accept the geometry values in a maps plugin’s marker table. We rewrote those values in the dump into a form any MariaDB server accepts, restored it, and counted every table on both sides. All 60 matched, row for row, eleven minutes after we started.

August 2026  ·  4 min read

SECTOR

Business moving its websites to a new server

SCALE

Plesk to Plesk migration, WordPress databases

PLATFORM

Plesk Obsidian, CentOS 7 to AlmaLinux 10, MariaDB 10.5 to 10.11

ENGAGEMENT

Database copy failed during migration

60 / 60

Tables with exactly the same row count on the old and new server

26,410

Rows on both sides after the restore

136 / 136

Map markers carried over, with the original coordinates intact

Environment

What the migration tool said, and what the restore saidThe migration tool reported a character set error for the database. Restoring the dump by hand failed with MariaDB error 1416 on the map plugin table, which holds two POINT columns. One column held valid points, the other was empty on every row. A rewrite of the dump turned both into valid geometry, and the restore completed with every table count matching.What the migration tool said, and what the restore saidMigration toolcan't decode byte 0xbereads like a charset problemRestore by handERROR 1416geometry, map plugin tableMap marker table136 rows, two POINT columnslatlng: valid pointslnglat: empty on every rowraw internal format in the dumpDump rewrittenST_GeomFromWKB(…)restore exit 060 / 60 tables26,410 rows matchThe error message on the left was about this database. It was not about this problem.

Scroll the diagram sideways to see all of it →

The tool’s message named the right database and the wrong cause.

The problem

Two databases failed, both with the same message. Plesk’s migration tool moved 101 databases from the old server to the new one. It flagged two as failed, and its log for both said 'utf-8' codec can't decode byte 0xbe, which reads like text stored in an older character set. We fixed the first database separately. This one, a WordPress site’s database of 60 tables, had arrived on the new server as an incomplete copy of 52 tables. Before touching it we dumped that partial copy, so we could put it back exactly as it was.

Investigation

Ask the database, not the migration tool. We dumped the source database ourselves and restored it by hand. It failed, but not with a character set error: ERROR 1416 (22003): Cannot get geometry object from data you send to the GEOMETRY field. The table was the WP Google Maps plugin’s marker table, which stores each marker as a POINT in two columns, latlng and lnglat. Only this table held geometry, 136 rows; the plugin’s circle and rectangle tables were empty. latlng held a valid point in every row. lnglat was empty in every row on the old server, although the column is defined as NOT NULL. The dump wrote the points in MariaDB’s raw internal form, a 4-byte spatial reference followed by the binary point. A second dump without --hex-blob failed the same way.

The migration tool’s message pointed at the character set. The database’s own error pointed at one table of map markers.

What we can and cannot prove

One rewrite changed two things. Our rewrite turned every raw point into a standard ST_GeomFromWKB(…) call and also put a real point into the empty lnglat column. So we know the combination works, but we did not separate which of the two the new server objected to: the raw internal format or the empty values. We also did not test whether the character set message meant anything for this database. Both databases the tool flagged carried the same message, and once the geometry was fixed this one restored cleanly.

At a glance

Challenge

A Plesk migration failed to copy a WordPress database, and the migration tool reported a character decoding error.

Approach

A manual restore failed with MariaDB error 1416 on a maps plugin’s marker table: raw geometry in the dump, and a NOT NULL point column empty on every row.

Result

One rewrite of the dump into standard geometry calls. Restore exit 0, all 60 tables and 26,410 rows matching.

The fix

  1. Back up the destination first: the partial 52-table copy dumped before anything was changed
  2. Rewrite only the geometry: one sed pass over the hex dump turned each raw point into ST_GeomFromWKB(0x0101000000…), the standard form without the internal spatial reference
  3. Fill the empty column: lnglat gets the same point in longitude-latitude order, as its name says, because a NOT NULL geometry column cannot take an empty value
  4. Check the dump before restoring it: 136 points matched, 272 geometry calls written, 0 raw values left
  5. Restore, then count everything: every table’s row count compared on both servers, three verification passes

Outcome

Every table and every marker accounted for. The restore finished with exit code 0. All 60 tables had exactly the same row count on both servers, 26,410 rows in total, and all 136 map markers were there with latlng identical to the source. One deliberate difference remains: lnglat now holds a value where the old server had none, so that column is not byte-for-byte the same. We did not check how the maps render on the site itself. The old server’s data was only read, never changed. The lesson we take: when a migration tool reports an error, reproduce the step by hand and read what the database itself says.

More case studies

41 GB WordPress News Site Migration

76,548 posts, the same count on both servers

OpenCart Store Off Failing Hardware

17 / 17 row checks matching old and new at the switch

ionCube and OPcache Stuck in a Loop

≈300 s → 2.2 s homepage render after one setting

Moving databases between servers?

We reproduce every failed step by hand, fix the real cause, and count every table on both sides before calling it done.