I wanted to move my wordpress from www.domain.com/old-name to www.domain.com/new-name. I thought that this is no problem and I missed backing up...

Now if your are logged in into the dashboard the plugins are not working as expected. The problem is that the css and js files have an old absolute path in it. Example:


Why does Wordpress takes here an absolute path and where is it stored?

There is no entry in the database...


Perhaps it is because I created a symlink with the old-name. I created the symlink to get the page running ... If I remove it I get the following error:

Warning: require_once(/var/www/web/mag/old-name/wp-includes/pomo/translations.php) [function.require-once]: failed to open stream: No such file or directory in /var/www/web/mag/old-name/wp-includes/pomo/mo.php on line 10

Fatal error: require_once() [function.require]: Failed opening required '/var/www/web/mag/old-name/wp-includes/pomo/translations.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/web/mag/old-name/wp-includes/pomo/mo.php on line 10

Why does he takes the old name? Is it a server setting/caching?

  • 1
    you've done something strange, your example is a mix of a URI and a server path. – Milo May 22 '13 at 14:59

Perhaps the error was the trailing slash at end of my string (www.domain.com/new-name), because in the content I had links such as www.domain.com/old-namewpcontent/uploads/2013/05/image.gif. Undo the changes didn't worked.

I tried to install a fresh copy of Wordpress in the new folder and take over all files, theme and database tables. This didn't worked.

Somehow I could access my backend (both folders with similar wordpress content and database) and I extracted the content, menu, settings for every page/article/plugin. Than I used my fresh install again and put the content, settings, images, ... in it manually.

Hard work but this was the only option I had.


If you're porting your WP db from one URL structure, you will come across issues where absolute paths, such as image urls will no longer work. One solution is to export the DB from the old site, open it in a an editor and do a search replace like so:



"Your-new-site.com/" .

And then import the DB into the new site.

Of course make backups first, and make sure you test fully. In most cases I've ever encountered, this method works fine in about 98% of cases.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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