Support » Networking WordPress » File paths and site numbers assignment in Multisites

  • Hello,
    I have moved to a complete multisite network after reading the documentation, forum, and a couple of trials and errors attempts to understand how multisite works compared with a single-installation. I have encountered very similar multisites issues to other users who have had their problems sorted in the forum so that was very useful also.

    My query to more experience Super Admins is how do they identify the correct site numbers and SQL tables when they are dealing with hundreds of sites for example?

    I am curious because at the moment I have created one root site and one subdomain. But I have deleted the subdomain site a couple of times to understand how the multisite system works. Each time you create a site the system assigns a site-number and a number of tables (wp_# with # the site-number) in the mySQL database. This is all done automatically and with no control from Super Admins as far as I understand.

    The file paths are also assigned automatically also so at the moment my second subdomain upload files in:
    /wp-content/blogs.dir/4/ and “4” is because I have deleted the site twice to explore things around. So when adding a new site, the system assigned 3 and 4 respectively to the new sites.

    Is it possible to restart the counting so the assigns number replicates exactly the number of sites available?

    I planning doing a Excel file or similar to create a spreadsheet information on the site and the numnber assigment so I can check that information as my network grows. Maybe there is a plugin, I am misssing something or there is a better way to deal with this.

    Thanks a lot!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Might I suggest simply editing those first couple of sites so as to keep the numeration in tact? As for keeping track, I can’t imagine needing to track sites by their ID at a large scale. For punctual needs this info is easily available thru the admin. I will give a word of warning, however, should you ever get into using blog templates – this can influence the file paths for uploaded media. I worked on a project where my blog ID2 served as the template for subsequent blogs, and all images for those other sites got uploaded under files/2/ – very annoying!

    hope that helps. good luck!
    -jennyb

    Thread Starter webmasterUR

    (@webmasterur)

    Hi Jennyb,
    Thanks a lot for your response and the advice on blog templates which are very useful insights indeed. I totally agree that before using a blog template on multisite, there are a lot of safety-checks to ask the authors of the blog to ensure the template is fully compatible with multisites.

    You also mentioned “editing the sites to keep numeration right”. Could you please explain how to do this? I am sure I am missing something plainly simple on my side.

    Cheers,

    Hya,
    So if you go into Superadmin>Sites, you have a list of all the sites you created in order. Rather than deleting them and messing up your numerical order, why not just rename them?
    Just an idea…I’ve never actually deleted sites, I only archive them.
    good luck!
    -jennyb

    Thread Starter webmasterUR

    (@webmasterur)

    I see what you mean now. Let’s see what other members think about this issue.

    Thanks again,

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Is it possible to restart the counting so the assigns number replicates exactly the number of sites available?

    Yes but why? If it’s just for OCD matters, I can’t suggest you do it. It’s just annoying and problematic to maintain.

    Thread Starter webmasterUR

    (@webmasterur)

    Hi Mika,
    I was wondering because how do Super Admin identifies a particular site tables on MySQL if needed then? If you have a handful is easy but if you have hunfreds or thousands it can prove quite complex.

    Maybe I am overlooking some Super Admin feature that does allow to control this easily.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I was wondering because how do Super Admin identifies a particular site tables on MySQL if needed then?

    What do you mean?

    When I write code, I grab $blog_id if I need the ID, but there are a lot of functions you can use to write to and read from the DB, per site.

    http://codex.wordpress.org/WPMU_Functions

    If you could give a concrete example, I could possibly have a better answer than ‘I use WP’s built in functions to read/write when I need to’ 😉

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘File paths and site numbers assignment in Multisites’ is closed to new replies.