I created a custom theme for my website and I'm in the process of updating the theme to work with Gutenberg. So far the file size of the theme's functions.php file is currently 1.9MBs. Does the file size of my theme's functions.php file matter? If so, then how do I create a custom plugin?

1 Answer 1


I guess it doesn't really matter, but I think it's better to keep it as short as possible.

Before, I used to put all of my logic in my functions.php file.

But it was quick big at the end (like 2000 lines of code, sometimes more).

Now, I prefer generate a sample theme thanks to this : https://underscores.me/

And for my plugin, that https://wppb.me/

Thanks to this, functions that I usually use in my websites are all in my plugin, so my theme is lighter

Think to seperate all your content logic in files/folder (inc/entities for post_type, inc/cron for your cron... it depends on you !)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.