unable to copy files new blog template


I am on wp 3.5.1 and using Version 1.6 which was just released of new blog templates.

I renamed my wp-content using this method: http://codex.wordpress.org/Editing_wp-config.php#Moving_wp-content_folder

This is the error message that I get when I try to create a new site off of the template site:

File System Error: Unable to create directory /web/sites/mysite.com/wp-content/blogs.dir/200/files. (New Blog Templates – While copying files)

I saw this post from 3 months ago

https://premium.wpmudev.org/forums/topic/new-blog-templates-not-copying-files-or-setting-pagepost-ownerships-correctly which says that there was an upgrade to fix the problem, it still doesn’t seem to work on my end.

How do I fix?


  • Ignacio
    • HummingBird

    Hi Atlanta.

    Ok, I saw your code and I have to say that that’s not the way to change the folders. It seems that you changed the constants in wp-includes/default-constants.php. You should not touch anything on WP Core. When you update WP (and they are releasing a new version very soon), that file will be overwritten again and your site will break.

    I want to warn you that change WP default folders is not a trivial question and you’ll need some knowledge of what you are doing. There are more problems that you’ll probably find when you change the folders. For example, some plugins are coded in a way that they suppose that the upload or content folders are on the default place (wp-content), so when you install one of these you’ll be in trouble and the plugin will not work.

    Anyhow, I’ll try to help you to achieve your target.

    There’s only one way to make these changes: In wp-config.php.

    Let’s change the content folder name:

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . 'my-new-content-name' ); // Be careful, there are not trailing slashes here

    $_SERVER is usually where you installed your WP installation, but it depends on how you did it. For example, if you installed WordPress in a subfolder inside your hosting, you’ll may want to name the content dir as this:

    define( 'WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . 'wp-subfolder/my-new-content-name' );

    Now the content URL. You’ll have to write the full URI:

    define( 'WP_CONTENT_URL', 'http://www.my-domain.com/my-new-content-name');

    Now as I saw on your mail you changed plugins directory too. Write this on wp-config.php:

    define( 'WP_PLUGIN_DIR', WP_CONTENT_DIR. '/my-new-plugins-dir' );

    And the plugins URI:

    define( 'WP_PLUGIN_URL', WP_CONTENT_URL . '/my-new-plugins-dir' );

    You don’t need to change PLUGINDIR but probably there are some plugins that still make use of it, so just in case

    define( 'PLUGINDIR', WP_CONTENT_DIR . '/my-new-plugins-dir' );

    Finally, the MU Plugins dir (very similar to the plugins dir:

    define( 'WPMU_PLUGIN_DIR', WP_CONTENT_DIR. '/my-new-mu-plugins-dir' );

    define( 'WPMU_PLUGIN_URL', WP_CONTENT_URL . '/my-new-mu-plugins-dir' );

    define( 'MUPLUGINDIR', WP_CONTENT_DIR . '/my-new-mu-plugins-dir' );

    I’d recommend you to change all of these first. I’ll be testing NBT meanwhile and see what happens when I add a new site with your exact folders values.


  • Ignacio
    • HummingBird

    Oh, yes.

    Add this constant to your wp-config.php too:

    define( 'UPLOADBLOGSDIR', 'my-new-content-name/blogs.dir' );

    And, I think I saw the error but it would be better if we do the changes on your server and test it. We have two options here:

    – I could get into your FTP and test it by myself. In that case, just tell me and I’ll tell you how you can send me the details.

    – You could do the next changes on NBT plugin:

    Inside the plugin there’s a folder called blogtemplatefiles . Open blog_templates.php file and look for the line no 1170:

    if (defined('NBT_LEGACY_PATH_RESOLUTION') && NBT_LEGACY_PATH_RESOLUTION) return ABSPATH .'wp-content/blogs.dir/' . $blog_id . '/files';

    Change it by:


    It should work now but it depends on how did you changed your folders and if you did it well.

    I this change works I will release a new version with it.


  • Atlanta
    • Syntax Hero

    @ignacio, thanks for the follow up here.

    I changed wp-config and the server company double checked the file path was correct for me, thanks for the step by step.

    I also made the change to the blog_template.php but still get the wp-content error message when I try to create a new blog.

    File System Error: Unable to create directory /web/sites/mysite/mysite.com/wp-content/blogs.dir/205/files. (New Blog Templates – While copying files)


  • Ignacio
    • HummingBird

    Hi Atlanta.

    As you may know, if you have been getting a bunch of mails about new sites created, I’ve been testing on your site a lot and here are my conclusions:

    1. There was a little bug that I fixed when a user changes the uploads folder name. If you take a look at your wp-config.php you’ll see NBT_LEGACY_PATH_RESOLUTION set to true. It’s important to keep it there if your upload folder is using the blogs.dir folder.

    2. You’ll not be able to create new sites right now. The reason is thaat you changed your wp-admin folder name too and is not a good idea. Why did you change it? Did you see it in some place? Someone recommending it? New Blog Templates tries to get two files inside wp-admin folder that allow the plugin to copy all the files but if it does not find the folder it will stop the execution. In fact, you’ll probably find more errors in other plugins than do the same.

    One idea would be to rename it back to its original name. I know that you probably did it thinking about security but there are so many other problems related to this renaming.


  • Ignacio
    • HummingBird

    Hi Atlanta.

    I answered you by mail. I think we can close this thread, but just in case, as you can see, renaming WP native folders could be a bad idea. The plugin will work only if your admin folder name is the original one. I don’t know if WP team will try to make things easier about this topic in the future, but I’d like too.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.