{"id":2302,"date":"2012-02-16T20:20:56","date_gmt":"2012-02-17T03:20:56","guid":{"rendered":"https:\/\/2012.phoenix.wordcamp.org\/?p=2302"},"modified":"2012-02-16T20:20:56","modified_gmt":"2012-02-17T03:20:56","slug":"session-preview-figuring-out-wordpress-constants","status":"publish","type":"post","link":"https:\/\/phoenix.wordcamp.org\/2012\/session-preview-figuring-out-wordpress-constants\/","title":{"rendered":"Session preview: Figuring Out WordPress Constants"},"content":{"rendered":"<p>by @bastosmichael<\/p>\n<p>You&#8217;ve probably used WordPress Constants before and may not even know it, if you&#8217;ve ever had to edit your wp-config.php file to Upgrade to WordPress Multisite or use a Domain Mapping plugin then you&#8217;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&#8217;s good to use a Constant or when you should just let a plugin handle what you&#8217;re trying to do. We will also cover some of the most useful constants to implement on your site.<\/p>\n<p><strong>Implementing WordPress Constants<br \/>\n<\/strong>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.<\/p>\n<ul>\n<li>Security and Sessions<\/li>\n<li>Cache and Optimization<\/li>\n<li>Multi-Site Implementations<\/li>\n<\/ul>\n<p><strong>Understanding WordPress Constants<br \/>\n<\/strong>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&#8217;re doing and can properly keep track of changes to the Codex. It&#8217;s great for optimization of your system, and may very well help you significantly increase speed as well as security.<\/p>\n<p>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&#8217;re not careful.<\/p>\n<p><strong>Conclusion<br \/>\n<\/strong>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.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>by @bastosmichael You&#8217;ve probably used WordPress Constants before and may not even know it, if you&#8217;ve ever had to edit your wp-config.php file to Upgrade to WordPress Multisite or use a Domain Mapping plugin then you&#8217;ve gotten your feet wet &hellip; <a href=\"https:\/\/phoenix.wordcamp.org\/2012\/session-preview-figuring-out-wordpress-constants\/\">Continue reading <span class=\"screen-reader-text\">Session preview: Figuring Out WordPress Constants<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":4191959,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-2302","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1Vmpp-B8","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/posts\/2302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/comments?post=2302"}],"version-history":[{"count":4,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/posts\/2302\/revisions"}],"predecessor-version":[{"id":2306,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/posts\/2302\/revisions\/2306"}],"author":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wporg\/v1\/users\/sethcarstens"}],"wp:attachment":[{"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/media?parent=2302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/categories?post=2302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2012\/wp-json\/wp\/v2\/tags?post=2302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}