Skip to content

Reconsider placing uploaded fonts within the uploads directory #59417

@johnbillion

Description

@johnbillion

In #53965 the decision was made to use the wp-content/fonts directory for uploaded fonts rather than wp-content/uploads/fonts.

Following this discussion in Slack about the Font Library, this decision should be reassessed. There are pros and cons for using wp-content/fonts versus using a fonts directory within the uploads directory, some of which are technical.

Notes

Arguments in favour of wp-content/fonts

Arguments in favour of wp-content/uploads/fonts

  • Directories outside of wp-content/uploads may not be writable, either as a security measure or due to offloading uploaded media to a CDN
    • This is potentially a blocker
    • A discussion on this topic has been started in the #hosting channel in Slack
    • This has been raised previously
    • The decision to store fonts outside the uploads folder is problematic for immutable file systems and set ups in which user uploads are offloaded. It's not simply a case of making the directory writable, plugins will need to be updated, servers reconfigured.
    • This could affect high impact hosts such as WordPress VIP, any site using security hardening plugins, or any site using DISALLOW_FILE_MODS
  • Font files are uploaded by users, therefore it makes sense to place the uploaded files within the uploads directory
  • Personal data export files are placed within the uploads directory. Even though there is no specific discussion on that decision in the core Trac ticket for that feature, it's likely this was done for the technical reasons above.

Please comment with any further arguments in favour or against either location.

Metadata

Metadata

Assignees

Labels

Needs DecisionNeeds a decision to be actionable or relevant[Feature] Font Library[Priority] HighUsed to indicate top priority items that need quick attention[Status] In ProgressTracking issues with work in progress

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions