Session preview: Figuring Out WordPress Constants

by @bastosmichael

You’ve probably used WordPress Constants before and may not even know it, if you’ve ever had to edit your wp-config.php file to Upgrade to WordPress Multisite or use a Domain Mapping plugin then you’ve gotten your feet wet with constants. We will go over the best way to use constants to Optimize your WordPress Installation as well as help you determine when it’s good to use a Constant or when you should just let a plugin handle what you’re trying to do. We will also cover some of the most useful constants to implement on your site.

Implementing WordPress Constants
Constants are global variables that represent a setting in WordPress which must act the same throughout your Site or Network. Constants can be implemented by adding them to your wp-config.php or functions.php file, always back up your wp-config.php file as well as any other files you may modify. We will cover the good and bad between using a constant in a plugin setting vs hard coding it at the end.

  • Security and Sessions
  • Cache and Optimization
  • Multi-Site Implementations

Understanding WordPress Constants
The upside of using constants is that it reduces your plugin footprint considerably. Only use constants if you really have an idea of what you’re doing and can properly keep track of changes to the Codex. It’s great for optimization of your system, and may very well help you significantly increase speed as well as security.

The downside of using constants is that you should be aware that constants may change with major version upgrades, using a plugin may help better insure that the changes are tracked and updated by the plugin author. There is such a thing as using too many constants, you could cripple your site if you’re not careful.

Conclusion
So I hope you come and enjoy the session and message me on Twitter (@bastosmichael) if you have any information that you want to share and help me make my presentation better.

About Seth Carstens

Seth is the Chief Technology Officer for Web3 Pro. He manages a team of Senior Engineers that work with WordPress, NodeJS, REACT, and other OOP stacks. A father of 2, golfer, new age tech adopter, and thrill seeker. Seth believes in living life to the fullest, without fear, because you only get 1 try at life. Find me on LinkedIn or Seth's Personal Blog
This entry was posted in Uncategorized. Bookmark the permalink.

4 Responses to “Session preview: Figuring Out WordPress Constants

  1. John Smit says:

    Thanks $autor!Your share some great insurancetricks,thanks for sharing all thisclear.I’ve subscribed your RSS feed to keep up to date,looking forwvard to your newinfo!

  2. Thanks $autor!Your share some great insuranceadvice,thanks for sharing all thissimple.I’ve subscribed your RSS feed to keep up to date,looking forwvard to your newtips!

  3. Jeffery Tolbert says:

    Thanks for the great info and I will subscribe to your RSS to keep up with your new posts.
    Phoenix landscaping company

  4. Sherrie says:

    Replacing your water heater, furnace or AC unit is not typically a cost-effective endeavor.
    You don’t have to hire a professional service to come out and do your yard work or plant your flowers. I have tried many electric string trimmers ranging from Black & Decker to the Worx GT but I would have to say that the best string trimmer reviews come from the Greenworks electric trimmer.