Somewhere between a pristine penthouse and putrid pigsty.
That’s how I’d describe the typical appearance of my room growing up.
I had trophies and trinkets neatly aligned all the time; I made my bed some of the time; and I tossed my worn-but-not-yet-dirty clothes on the bed, floor, or chair pretty much all of the time.
Needless to say, my mother expected more from me, as she should have.
But try as she might, growth in my organization habits seemed to stunt at around eight years old … and they remain pretty much the same today.
Knowing this background, you’ll now not be so shocked by these screenshots of the wp-content and uploads folders of my site MidwestSportsFans.com:
Basically, this is the WordPress equivalent of my childhood bedroom.
Putrid pigsty, indeed.
Some files are in their place, some files are not, and there appears to be a worn undershirt from months ago underneath the bed that no one has bothered to toss in the laundry. (Hmm … but does it pass the sniff test? No! Bad Jerod. You’re 30 now.)
So let’s get personal here for a moment.
I’ve divulged my embarrassing organizational failings. How about you?
- Did your childhood bedroom embarrass your mother?
- More importantly, would your WordPress file storage structure embarrass her today?
Chances are your answer is the same to both questions …
If your answer is yes, fear not; the guidance in this post will prove quite helpful.
It’s Time to Clean Up Our (Digital) Rooms
Migrating and performing migration cleanups on a daily basis here at Synthesis, we see a number of WordPress sites that include years worth of static files. This includes images, PDF documents, multimedia files, and much, much more.
Look up at those screenshots from my site again. They provide a nice cross section of what accumulates over time.
In some migrations that we perform, it’s clear that the site owner has a well thought out content organization strategy for the back end of the site. Oftentimes, this means the site owner has used the WordPress media uploader exclusively to let WordPress handle the organization for them.
But more often than not, sites look like mine (see Mom! Everyone else is doing it!) and have files in a variety of places that are the result of plugin functionality or plain old “picking and choosing” when uploading via an FTP client.
Let’s run down some best practices for ensuring a file storage structure that is easy, intuitive, and will create far less pain for you or your managed hosting provider in the future.
Standard WordPress Files Locations
First things first: the fundamentals.
This page of the WordPress Codex shows the proper placement of all standard WordPress files. If this structure ever gets out of whack, your site probably won’t even work.
One way for it to get out of whack is for you to make a mistake moving or deleting files if you’re ever poking around via FTP.
If your site has a bunch of extraneous files floating around, it can be easy to lose sight of what is a core file and what is not.
If you can’t tell this difference, it can lead to the blank white screen of death for you and your visitors.
And if your site is whitescreening, your online business is shut down.
To channel the spirit of the ubiquitous DirecTV ads:
Don’t let your online business be shut down by the white screen of death … get rid of extraneous, unorganized files!
Managing Premium Content
WordPress plugins like Premise, or Download Manager allow you to create premium content and downloads. In many cases, these are put in a different structure than your normal static WordPress files.
The best practice in this case is to use the plugin’s recommended or default settings.
Make sure you research to know where files are being stored, but don’t then try to get fancy and customize it. What is the point?
You don’t want to risk your customizations being overwritten when you update the plugin or having to change strategies down the road.
As they say: keep it simple, stupid.
This is where file organization and structure can get the trickiest. It’s also where it’s the most important.
If you have multiple installs of WordPress underneath one domain, as many of you do, you might have individual WordPress file structures at /site1, /site2, /site3, /site4, and so on.
Folks in this boat should consider moving to WordPress multisite.
Remember the importance we placed above on maintaining the proper structure of the core WordPress files? Why manage core files and plugins for multiple sites when you can manage a single instance of WP multisite with a subdirectory installation?
The second option is easier, safer, and just plain better.
It can also be a daunting transition to make. But then again, that’s why you’ve got premium managed hosting in the first place right?
We’re happy to help you out with a multisite transition. (It will actually make you a much easier customer for us to support in the future because of the reduced risk of file catastrophe.)
Content Delivery Networks (CDNs)
But what about CDNs? you ask. Aren’t they the panacea for all my file storage worries? you wonder.
Well, yes and no.
When properly configured to perform specific tasks, CDNs can work wonders. They can be of huge help with speed and performance
However, serving an image from a CDN also means that you have to reconfigure your URL to include a CNAME that points to your CDN provider’s infrastructure. In the eyes of a search engine the URL has changed. This can impact your site’s ability to capture image search.
Of course, you can use 301 redirects and other techniques to re-educate the search engine. However, these can get very difficult if your messy file structure doesn’t provide a clean pattern to serve as a basis for the redirect.
Remember, in SEO it’s all about the URL, and CDNs naturally must serve multimedia from a different URL.
The point is that there are pros and cons. Ask us about how we use CDNs and how we can customize their use to best fit the needs of individual sites.
It’s Time to Make Our Mommas Proud (And Our Sites Safely Organized)
As you can see, being neat and organized is one of those childhood lessons that lasts well into adulthood.
I’m willing to forgive you if your bedroom or desk is messy (let’s be honest, I’d be a hypocrite if I didn’t), but I can no longer sit back and let you introduce risk to your site (and shame to your mother) with a messy, disorganized server file structure.
And I’ve decided to lead by example.
Look at the wp-content and uploads folders of my MidwestSportsFans.com now:
See how much cleaner they are?
And they’d be even cleaner if it didn’t require so much work to go back into post after post and change so many URL references. But these are the challenges wrought over the long haul by an initial faulty file structure strategy.
It’s my time to pay the piper.
Do yourself a favor: start out organized … and stay that way.
If you’re already disorganized like I was, clean it up as much as you can and get organized henceforth.
You never know when mom might pop her head in the door to check.