Title: Removing excess code
Last modified: October 1, 2020

---

# Removing excess code

 *  [webkiwinz](https://wordpress.org/support/users/webkiwinz/)
 * (@webkiwinz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-excess-code/)
 * I am wanting to start a reasonable discussion on how to remove, and keep removed
   excess code that I feel is creeping into WordPress. I am not trying to start 
   an argument but to find solutions for the minimalists among us.
 * Examples: I created a bare minimum theme but having a css file with zero css 
   commends in it, just the headers. I created an index.php page that calls header,
   footer and closes the main div. Nothing more. I removed all other themes, turned
   off pingbacks, notifications, comments etc. I exited the admin system and opened
   the page.
 * There were at least three loaded js files (embed, emoji, comments), and xmlrpc
   is turned on. There are also css files that are not required.
 * I also note that there is default wordpress code that on update loads in themes
   like 2020, 2019 and 2018 even after they have been removed.
 * Are there proper ways to force these to not load and reduce the growing list 
   of inclusions in WordPress? Is there an article or list for minimalising WordPRess
   for security and performance?
    Cheers

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/removing-excess-code/#post-13480856)
 * All external .js and .css files should be enqueued, so you could dequeue them
   provided you know the args used to enqueue to start with. Thus you need to add
   server side code to prevent requesting of unwanted client side files. It’s worth
   the trade-off IMO.
 * You can get a bare bones WP environment started by defining `SHORTINIT` constant
   in wp-config.php. But it’s **very** bare bones, no theming, no users, no a lot
   of things. I’m unsure of its intended purpose, a kiosk installation maybe.
 * There’s little point in trying to reduce the core code base. As you’ve observed,
   it all comes back after the next update anyway. There’s no mechanism to only 
   apply a partial update. You could create your own fork of WP and assume all maintenance
   responsibilities. TBH, few would argue that WP is not a beast of a code base.
   If that’s a serious concern for you, WP is probably not the CMS for you.

Viewing 1 replies (of 1 total)

The topic ‘Removing excess code’ is closed to new replies.

## Tags

 * [minimalist](https://wordpress.org/support/topic-tag/minimalist/)

 * In: [Developing with WordPress](https://wordpress.org/support/forum/wp-advanced/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/removing-excess-code/#post-13480856)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
