• Resolved robhindle

    (@robhindle)


    I’ve used the Migrator a couple of times to transfer wp sites from one SiteGround account to another. Much easier than using the alternatives especially as I was changing domain name and bringing WP from a subdirectory down to root – very easy and highly recommended. However I’ve since noticed that a lot of question marks have appeared in old posts (new posts are OK) on both sites. Usually the question marks replace spaces and most commonly between sentences so I get something like “aaa. ?Xxxx” or “aaa.? Xxxx” but occasionally between words “aaa?xxx”.

    It could be something like a non-breaking space or tab character being replaced and it may be nothing to do with Migrator (might it change the database character set?). Anyway it’s worth raising awareness. If you migrate a site, by whatever mechanism, take a backup of the _posts table before and after so, if you hit the same issue, a file compare might identify the rogue character.

    I don’t need help, I’ve fixed the database using SQL query: UPDATE wp_posts SET post_content=REPLACE(post_content, ‘?’, ‘ ‘); replaces wanted question marks too but that’s not such a big issue.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi

    I am not much of a tech person, so I am not very familiar with using SQL query. Possible to show me how to approach the fix via C panel?

    Scratch that. I already figured it out.

    However, it doesn’t clean up the titles and SKUs of products in Woocommerce. Any fix for that?

    Thread Starter robhindle

    (@robhindle)

    It’s essential to take a backup first and check the site carefully after the move. The question mark issue was just one of the more obvious problems and one I’d like to think the authors of Migrator might be able to diagnose and fix.

    What I did, changing domain name and directory, may have made the migration harder and so while Migrator helped, it didn’t deliver a complete solution.

    I had other problems including embedded links like http://oldsiteexample.com/file-external-to-wordpress in test mode those appeared to work because oldsiteexample.com was still there but going live I needed to do another database fix.

    Fixing the shifted web site might call for a significant amount of messing with the database, the example SQL code fragment is only a start and has the problem that it also removes question marks you want. It was intended as an example, not a fix. With a small site & small number of exceptions that’s OK you can edit the affected pages to put them back. In my case I had a load of web links with parameters like example.php?id=123, that needed special treatment. (Including search and replace only those ?s with a space before or after but that too is a simplification, doesn’t fix everything.)

    I don’t regard these other issues as a problem with Migrator, there are too many potential site specific problems for a tool like this to anticipate and cater for all eventualities. Migrator might deliver a 100% success in many cases but as with any significant web site change you should backup, test, and be ready to revert to the original or be ready to implement some fixes. Post advance “down-time” warnings, choose a quiet time for website activity and suspend changes until the move has been successfully completed and tested. One of my sites only needed the question mark fix and a few manual edits, the other was more complicated.

    I’m glad I found Migrator, it was so much easier than any other WordPress migration approach I’ve tried in the past and I had to undertake similar post-move fixes then too. It’s so easy to use that it’s worth a try. It only took me a few minutes to move a site (but I do have fast internet). If the preview test mode finds any problems and you’re not into debugging and fixing then revert and try a different approach. (Don’t try messing with the SQL database if you’re net experienced, it could end in tears.)

    Plugin Author Stanimir Stoyanov

    (@sstoqnov)

    SiteGround Representative

    Hey,

    Sorry, for my late response on this thread.

    The question marks issue usually occur when you you change your database charset.
    I guess that you have used different charset, before migration, and after the site was moved to SiteGround server we use the recommended WordPress charset utf8mb4 and collation utf8mb4_unicode_ci.

    Would it be possible if you still have access to your old servers to provide us the charset and collation of WordPress database, before migration?

    I had other problems including embedded links like http://oldsiteexample.com/file-external-to-wordpress in test mode those appeared to work because oldsiteexample.com was still there but going live I needed to do another database fix.

    After a successful migration we search and replace the old url with the temp/new one. Is it possible that you have hardcoded these links in your templates? We search and replace for database only, but not the files.

    Cheers,
    Stanimir

    Plugin Author Hristo Pandjarov

    (@hristo-sg)

    SiteGround Representative

    I am marking this as resolved 🙂

    Thread Starter robhindle

    (@robhindle)

    Old site was still available so I pulled down a DB dump.
    ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

    Is it possible that you have hardcoded these links in your templates? We search and replace for database only, but not the files.

    Those links were in posts. Could the conversion have had a problem because I was shifting to a different domain and at the same time from a subdirectory to base level?
    I may need to shift another WP site to SG from the same place so I’ll try to get better diagnostics if I have any problems next time .

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

The topic ‘Possible bug: unwanted question marks inserted?’ is closed to new replies.