• The way blogs seem to be stored in the database is to create a set of files per blog. I have in the past run a wordpress site under 1 domain that killed my server because the file system could not handle the amount of files in a single directory. First, has this been corrected? Second, has anyone else experienced this or am I simply overpowering WP’s capabilities? Has anyone modified the db file creation process to assume a files per directory limit to resolve this issue and finally, does anyone think I should give up on WP as my site would be too big? Note: before anyone says just buy a bigger server or put it on a cluster or scale with AWS, those actually do not resolve the directory limitation of operating systems and does not resolve this issue,it only half-heartedly postpones the inevitable crash of WP. Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • There is no problem caused by directory size.
    The only files that accumulate in WordPress are media such as images, they are stored in date structured directories such as “2018/03/22/”, otherwise everything is stored in a few database tables. The architecture is capable of scaling, so don’t worry about that.
    Of course someone could create a plugin that did accumulate files in a single directory, but that would be an incompetent choice.

    Thread Starter jwce

    (@jwce)

    Ross, Let me be more specific just to be sure we are speaking about the same thing. I am specifically talking about the amount of MySQL database files that get created in the database_name/ directory. every time a blog is created it was creating a template, frm and 2 other files so when i had 5,000 blogs going the directory had 22,000 files in the database directory which overloaded the operating system’s ability to file handle the database leading to the server seizing. If WP does not create files per blog or per other event anymore then you are correct, we should be fine. otherwise, the database directory for MySQL files wil build up and again cause the OS issues. If you are confident it is ok and that what I experienced in the past is not happening anymore, I will rent a server and load wp and just create some blogs and see what files it creates to confirm it is or is not doing it, but I have not seen any database architecture changes to indicate this has been changed. FYI I would be hosting more than 23,000 blogs to start going to more than 1M within 12 months. Thanks for your response.

    Thank you for clarifying your question.
    I answered from my experience of shared hosting and localhost configurations, in these cases the mysql behavious is to create one directory per database (in /var/lib/mysql), which in your context is not viable.
    My understanding is that you should be looking at multisite, this is how wordpress.com is managed. You should be asking them how it is hosted and managed. At the scale of operation you are expecting you should not be relying upon free advice harvested from volunteer support forums.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Blog database file storage architecture’ is closed to new replies.