How to Organize WordPress Files in Media Library Folders

Featured Imgs 13

Do you want to organize WordPress files in the media library folders?

By default, WordPress automatically creates folders in the media library based on year and months. However, some users may want to create their own custom folders for different media files.

In this article, we’ll show you how to easily organize WordPress files in custom media library folders.

Organizing your media library folders in WordPress

Why Organize Your Files in Media Library Folders?

Normally, WordPress stores all your images and other media files in the /wp-content/uploads/ folder. To keep it structured, all files are stored in folders organized by year and month.

https://example.com/wp-content/uploads/2020/07/

This works perfectly for most websites. However, some users may want to get better control on how WordPress stores media files.

For instance, a photography website may want to organize WordPress images by topic, location, or event folders. Similarly, a portfolio website may want to organize their media uploads by type, client, industry, and more.

This allows them to easily browse their media files. At the same time, it improves image SEO, as you can now add keywords in your image file URLs which makes URLs more meaningful.

Having said that, let’s take a look at how to easily create folders to organize your WordPress media files.

How to Organize Your WordPress Files in Media Library Folders

First, you need to install and activate the Media Library Folders plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Note: The free version of the plugin only lets you create up to 10 folders. You will need to upgrade to the pro version if you want to make more.

Upon activation, the plugin will add a new menu item labeled ‘Media Library Folders’ in your WordPress admin sidebar. Clicking on it will open plugin’s folder view showing all the folders inside your WordPress upload directory.

The Media Library Folders page within your WordPress dashboard

From here, you can create new folders and add files to them. You can also move, copy, rename, or delete your files.

We’re going to create some new folders and add images to them.

To create a new folder, simply click the ‘Add Folder’ button and then type in the name you want to use for that folder.

Tip: You cannot use spaces in folder names. Instead, use hyphen or underscore to separate words if needed.

Adding a new folder using the Media Library Folders plugin

It’s also possible to make subfolders within folders, if needed. To create subfolders, simply click on the parent folder to select it, and then click on the ‘Add Folder’ button.

Adding a subfolder using Media Library Folders

We created two subfolders for our ‘Landscape-Photos’ folder. They are ‘Forests’ and ‘Mountains’. To view a subfolder, you need to click on the small arrow to the left of the main folder:

Click the small arrow to expand a folder to see the subfolders

To add files to your folders, simply click on the folder then click the ‘Add File’ button. After that, go ahead and upload as many files as you want.

Uploading files using the Media Library Folders plugin

Once you’re done uploading files, you’ll see them on the screen as thumbnails with the filename below:

The uploaded images showing in the Forests folder

It’s easy to add your uploaded files to your posts or pages. You can add them just like any other files that you’ve uploaded to the media library:

Viewing the uploaded images in the Windows Media Library

Moving and Copying Your Files in Media Library Folders

What if you need to move a file to a different WordPress media library folder? It’s easy to move it or copy it using Media Library Folders.

Moving an Image to a New Folder in the Media Library

To move an image or any other file, simply check that the move/copy toggle is set to ‘Move’ and then drag the image to the correct folder.

Tip: Your mouse pointer should be on the new folder, as shown below. The small thumbnail of the image is just showing you what you’re moving, not where you’re moving it to.

In this example, a mountain image was incorrectly placed in the Forests folder. We are moving it to the Mountains folder.

Moving an image into the Mountains folder

Copying an Image to a Different Folder in the Media Library

To copy an image, set the move/copy toggle to ‘Copy’, then go ahead and drag the image as before. Here, we are copying an image of a bird and flower, so that it’s in both the ‘Bird-Photos’ and the ‘Flower-Photos’ folders.

Copying a photo so that you have it in two folders

This time, your original image will stay in place. Your image will be duplicated so that it can be present in both folders.

Renaming Files and Folders in Media Library Folders

You can easily change the filename with the Media Library Folders plugin. First, find the file you want to change and click the checkbox below it. Next, click the ‘Rename’ button at the top of the screen.

After that, type in the filename you want to use. Image filenames can have a small impact on your WordPress SEO, so it’s recommended to use keywords within them. Here, we’ve changed the file name for a post on inspiring forest images:

Changing the file name of an image using the Media Library Folders plugin

You cannot rename or move a folder in Media Library Folders. However, it’s possible to create a new folder, move all the images into it, then delete the old folder.

To delete a folder, right click on it, and then click ‘Delete this folder?’ button. Here, we’ve moved the forest images into a new folder called Woodlands, and we’re deleting the Forests folder:

Deleting a folder using the Media Library Folders plugin

You’ll then see a message prompting you to confirm. Click ‘OK’ to continue and the folder will be deleted. You’ll no longer see it in the list:

The Forest folder has now been deleted

Tip: You may see the message ‘This folder is not empty and could not be deleted’ even though the folder looks empty. Simply click the ‘Sync’ button. WordPress may have created additional versions of your images that need deleting. After syncing, you’ll be able to review and delete those images.

Click the Sync button to check for other files in the folder

We hope this article helped you learn how to organize WordPress files in media library folders. You might also want to check out our articles on fixing common image issues in WordPress and other must have WordPress plugins for business websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

The post How to Organize WordPress Files in Media Library Folders appeared first on WPBeginner.

update values with subquery returns not updatable

Category Image 101

Hi all, I have a question about updating two values in a sql table using a subquery. My database is called books and the below table books too:

id   title    author   location_id
11  Tera    Netrear 4
14  Disser  Bubu    1
15  Tenno   Puoio   4
16  Oban    Tyrone  5
18  Sisnobi Teru    3

Location_id is indeed another table as it's a foreign key in this table but that shouldn't matter. So what I want to do is to change all the location_id currently at 4 to 2. I know i could do it like this
update books set location_id = 1 where location_id = 4 but I'd like to know if I could do it with a subquery, something like update (SELECT * from books where location_id = 4) as thebook set thebook.location_id = 2 but when I run this query it tells me that the target table thebook UPDATE is not updatable. Why is that and can this be achieved - I don't really mind if it's not performant etc, I think it should be possible but I can't quite get the right way to do it...
So, the idea is, make a selection first then change a/more value/s on that selection, this is the concept I'm try to prove.
Any idea?

10 New Plugins for Beginner & Experienced Bloggers

Wp Plugins

Plugins for Beginner Bloggers and Experienced WordPress UsersSo you finally took the plunge and decided to create a WordPress website. That’s pretty impressive! You went ahead and added a great deal of fantastic content. Again, that’s awesome. All that remains now is growing your WordPress website and rock your world. Perhaps that’s not the case. You’ve been at it for a while […]

The post 10 New Plugins for Beginner & Experienced Bloggers appeared first on WPExplorer.

All in One SEO Pack Plugin Patches XSS Vulnerability

Wp Plugins

All in One SEO Pack patched an XSS vulnerability this week that was discovered by the security researchers at Wordfence on July 10. The popular plugin has more than 2 million active installs, according to WordPress.org.

Wordfence researchers categorized it as “a medium severity security issue” that could result in “a complete site takeover and other severe consequences:”

This flaw allowed authenticated users with contributor level access or above the ability to inject malicious scripts that would be executed if a victim accessed the wp-admin panel’s ‘all posts’ page.

Version 3.6.2, released on July 15, 2020, includes the following update in the changelog: “Improved the output of SEO meta fields + added additional sanitization for security hardening.”

All in One SEO Pack users are strongly recommended to update to the latest version. At the time of publishing, just 12% of the plugin’s user base is running versions 3.6.x, which includes the three most recent versions. This leaves more than 1.7 million installations (88% of the plugin’s users) vulnerable.

Many users don’t log into their WordPress sites often enough to learn about security updates in a timely fashion. Plugin authors often don’t advertise the importance of the update on their websites or social media. This is the type of situation that WordPress 5.5 should help to mitigate, as it introduces admin controls in the dashboard that allow users to enable automatic updates for themes and plugins.

Should WordPress Themes Add a Top-Level Admin Menu Item?

Featured Imgs 08

WordPress has almost always provided a top-level admin menu item for themes. It is clearly labeled “Appearance.” It is the single location that all WordPress users know to visit to modify any appearance-related things for their WordPress site. However, there is a movement within the Themes Team to allow themes to place an additional top-level menu link in the admin. The big question: should this idea move forward?

When the Themes Team (originally called the Theme Review Team) was formed, its members created a set of guidelines that would be shaped and reshaped over the years. They were a set of living guidelines that could always be changed with the times.

One of the oldest guidelines required that themes must place any custom admin pages under the Appearance menu item. It made sense. WordPress provided a standard location for any theme-related pages. The custom header and background features lived under Appearance. Widgets, also defined by the current theme, were housed as a sub-page. Eventually, WordPress’s custom nav menu system came along and was — you guessed it — situated under Appearance. The core developers even put the customizer link in the same place.

For over a decade, there was a well-defined standard. Sure, commercial themes outside of the official directory would sometimes break the mold. However, themes from the directory followed the pattern.

Now, the Themes Team is proposing that themes should be able to break from tradition.

The discussion arose after a question of whether themes should be able to add a custom panel to the block editor sidebar, which is not allowed.

“To keep the editor free from clutter, advertising and upsell, with the customizer being used less, and no dashboard widgets being allowed, can we give theme authors a better place to include their information, and limit upsell to that area?” wrote Carolina Nymark in last week’s team meeting notes.

The proposal seems to settle on the idea that themes will lose visibility as WordPress moves toward full-site editing and the customizer becomes less important. The customizer is not an ideal place for anything but theme options, but that notion seems to have been overlooked in the discussion. Nevertheless, the original guideline that disallowed themes from creating top-level menu items preceded the advent of the customizer by several years. Advertising, documentation, plugin recommendations, and similar pages were always allowed under the existing Appearance menu. The usefulness of the customizer was never a necessary part of that conversation.

Ultimately, the question should be about what is best for users. There is no data to support making the change or sticking with the status quo. However, we do have a standard that has existed for years.

The Proposed Guidelines

The proposal would create several new guidelines for theme authors to follow and reviewers to check, assuming the theme created a top-level admin menu item:

  • No admin menu priority may be used.
  • No UI or color changes are allowed for the menu item.
  • The title must be kept short and not include spam.
  • No more than three sub-pages.
  • Child themes are limited to one sub-page or can remove the parent’s pages and add its own.

Some of these make sense and follow along with existing guidelines, such as not spamming or changing the admin UI. However, others could be problematic.

If moving forward with the proposal, setting a menu item priority should be required rather than not allowed. If anything, it would make sense to require a specific priority to place the custom menu item immediately after the existing Appearance item. This would at least group them together by default. If changing the place where users are accustomed to seeing theme-related pages, it is probably best not to break too far from the standard location.

No more than three sub-pages? Surely there will be a theme with a top-level admin menu item that needs four sub-pages at some point. If giving theme authors the freedom to take up valuable real estate in the admin, a limit of three sub-pages seems like a rule to fix the mistake of allowing the top-level item in the first place. It is an arbitrary number at best. There would be no reason to cap it once making the guideline change. It also adds one more item that the team will need to police.

The limitation of sub-pages for child themes seems just as arbitrary. No such limitation exists when placing sub-pages under the standard Appearance screen.

The entire proposal is little more than extra work on a team that is already strained for resources.

Instead of the simple rule that has existed for years, the proposal adds a new rule with several sub-rules. If the team desires the extra work, I suppose this point doesn’t matter.

The Elephant in the Room

There is one Aspect of this discussion that everyone knows about but few are willing to broach. Underneath all the guidelines from the Themes Team and whether most theme authors support a particular decision is how this affects the financial bottom line. When we talk about visibility of a theme’s admin pages, we are primarily talking about providing another avenue for commercial upsells.

Some of this discussion on visibility is shrouded in concepts such as surfacing end-user documentation or adding a visible readme for the user’s benefit. These are legitimate concerns, especially when theme developers have watched tickets to address such downfalls seemingly dwindle into obscurity over the years. Whether a top-level admin menu item makes sense for exposing theme documentation might be worth discussing, but there is no world in which this would be the primary use case.

The topic of visibility rests on the idea of upselling the pro version of the theme, add-ons, or other services.

Far too many plugins already go overboard, creating a billboard of the WordPress admin. One of the things users could almost be assured of is that themes from the official directory were constrained enough that they were not the hot mess that plugins have become as of late. However, that could all change.

Do we really want an extra top-level admin menu item that will be, for all intents and purposes, to advertise?

Maybe it doesn’t matter in the end. Users are so accustomed to the clutter produced by the dozens of plugins on their sites. One more may not matter at this point.

Or, should we be having a different conversation altogether? If this ultimately boils down to advertising, are there ways we can open this up for theme authors while still creating a user experience that keeps the WordPress admin free of clutter?