I have moved a wodpress website to a new domain with a new host. The website looks, fine and most of the wp-admin area works just fine too. However, certain pages on the admin area don't display and show me an error message like this:

Warning: mysql_real_escape_string(): No such file or directory in /homepages/14/d564522419/htdocs/wp-content/themes/labomba/functions/admin-interface.php on line 111

Warning: mysql_real_escape_string(): A link to the server could not be established in /homepages/14/d564522419/htdocs/wp-content/themes/labomba/functions/admin-interface.php on line 111

What is the significance of "d564522419"? Is this a reference to the old host?

  • It looks like a full path reference from the old site that is now invalid. I do not know WP, but clearly something went wrong. This should be easy enough to fix. I will let a WP expert answer.
    – closetnoc
    Commented Mar 6, 2015 at 16:15
  • "/homepages/14/d564522419/htdocs/...." must be a reference to the new host, otherwise PHP would not be producing such an error. (But this is easy to confirm... what is the document root?)
    – MrWhite
    Commented Mar 6, 2015 at 19:36
  • What does line 111 look like? Is the 2nd (connection) param being passed to mysql_real_escape_string()? I guess not and it's relying on the "last connection". This admin page would seem to relate to your theme "labomba" - which would seem to be a bit out of date - I would not expect later versions of WordPress to be using mysql_real_escape_string().
    – MrWhite
    Commented Mar 6, 2015 at 19:49

1 Answer 1


I've run into instances of disrupted file paths after WordPress migrations, of two types, which cause similar issues. Typically, these file path problems result from either corruption of serialized data or incorrect/non-matching installation paths in WordPress settings before one exports their site database. Without knowing more, it's hard to say, but it appears the '/homepages/14/d564522419/' portion is your hosting environment's user directory path to your site's document root.

Many people don't realize that before you save/export your WordPress database for importation into another site, that you should set the install path to match what it should in the new site. And sometimes, there are just hosts that use quirky environments that aren't conducive to smooth exits. What you can end up with, if you aren't careful, are issues like this. You can fix this by updating your database manually, which takes more time than building a new site probably will--and you still may have issues due to the data serialization situation. Regardless of what caused the issue, if you have a copy of the database on hand to keep as a backup, you have some options designed for this very problem. Keep your copy safe and put one of these options to work on your new install. [Note: If you can't log in to access a plugin, you'll want to make use of the first solution.]

interconnect/it's great utility, Search Replace DB (a stand alone script) is one: Search Replace DB

Another option is the plugin: Velvet Blues Update URLs

I have used both on projects migrating WordPress with success. I prefer Search Replace DB, and the stable and beta versions (2/3 respectively) both do their job. Be sure to check out the official Moving Wordpress - WordPress Codex tutorial.

Even after using such utilities, you may find you need to take additional steps to get the install running 100% smooth. Sometimes media galleries are problematic with image/upload paths that linger for some reason, or sometimes custom themes have settings that do less than optimal things, create tiny issues that the path replacements miss in the database...and you'll only discover it by systematic auditing/testing/clicking. Most of the time, the utilities will nail it and take care of things. Just be prepared for the possibility that there are data serialization issues that won't go away, which can make starting over with a fresh site necessary. It's rare, but it happens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.