  {"id":5484,"date":"2008-04-21T11:07:28","date_gmt":"2008-04-21T17:07:28","guid":{"rendered":"http:\/\/www.masonworld.com\/blogging\/always-use-protection-when-writing-code\/"},"modified":"2026-04-03T09:42:17","modified_gmt":"2026-04-03T14:42:17","slug":"always-use-protection-when-writing-code","status":"publish","type":"post","link":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/","title":{"rendered":"Always Use Protection When Writing Code: Why You Need to Backup Website Code"},"content":{"rendered":"<p>I hear a lot of internet marketing gurus brag about how they cannot even write their own landing pages. They argue that all technical work should be outsourced so you can focus on marketing instead of coding. There is some truth to that, and I am not going to argue with people who have had million-dollar launches. But I have always wondered &#8212; how do you know if outsourced technical work is being done correctly if you do not understand the underlying technology?<\/p>\n<h2>The Case for Understanding Your Code<\/h2>\n<p>One thing you can say about internet marketing and the web in general &#8212; there is a lot of code involved. Code makes things work, and the quality of that code can make or break a project. Even if you outsource development, understanding basic coding principles helps you evaluate work, spot problems early, and backup website code properly before things go sideways.<\/p>\n<p>WordPress is a perfect example. Beyond the core engine, there are thousands of plugins and themes, all written by different developers with varying skill levels. A poorly written plugin can crash other plugins or take down your entire site. A theme with sloppy code can introduce security vulnerabilities or break during updates. This is why defensive coding practices matter.<\/p>\n<h2>Defensive Coding: A Lesson from WordPress<\/h2>\n<p>Back in the early WordPress days, I was working with a theme developer on a new design. We were testing on WordPress 2.5, and the theme called a function for displaying user avatars next to comments. The problem was that the code assumed the function existed &#8212; it called the function directly without checking whether it was available first.<\/p>\n<p>When someone tried to run that theme on an older WordPress version where the function did not exist, the whole site crashed. The fix was simple &#8212; check whether a function exists before calling it. In PHP, that looks like wrapping your function call in an existence check. One extra line of code prevents a catastrophic failure.<\/p>\n<h2>Why This Still Matters in 2026<\/h2>\n<p>The specific technology has changed, but the principle is universal. Whether you are working with WordPress plugins, JavaScript frameworks, API integrations, or any other code that powers your online business, defensive programming prevents disasters.<\/p>\n<p>Here are the key practices every website owner should understand, even if you are not writing the code yourself.<\/p>\n<p><strong>Always backup website code before making changes.<\/strong> This is non-negotiable. Use version control like Git, or at minimum take a complete backup of your site files and database before any update. Modern hosting platforms and plugins make this almost effortless.<\/p>\n<p><strong>Test changes in a staging environment.<\/strong> Never make untested changes on your live site. Most quality hosting providers offer one-click staging environments where you can test updates, plugin changes, and code modifications safely.<\/p>\n<p><strong>Check for compatibility before updating.<\/strong> When WordPress releases a major update, do not rush to install it. Wait a few days for plugin and theme developers to confirm compatibility. Read the changelogs.<\/p>\n<p><strong>Use monitoring and alerts.<\/strong> Set up uptime monitoring so you know immediately when your site goes down. Services that check your site every few minutes and send you an alert can save you hours of lost traffic and revenue.<\/p>\n<h2>The Bottom Line<\/h2>\n<p>You do not need to become a programmer to run a successful online business. But you do need to understand enough about code to protect your investment. Backup website code religiously. Test before deploying. And always &#8212; always &#8212; use protection when writing or modifying code.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"BlogPosting\",\n  \"headline\": \"Always Use Protection When Writing Code: Why You Need to Backup Website Code\",\n  \"datePublished\": \"2008-04-21T11:07:28\",\n  \"dateModified\": \"2026-04-03\",\n  \"author\": {\n    \"@type\": \"Person\",\n    \"name\": \"Mark Mason\",\n    \"url\": \"https:\/\/www.latenightim.com\/about\/\",\n    \"jobTitle\": \"Host, Late Night Internet Marketing Podcast\",\n    \"description\": \"Mark Mason helps part-time entrepreneurs build internet businesses one night at a time. Podcasting since 2009.\",\n    \"sameAs\": [\n      \"https:\/\/podcasts.apple.com\/us\/podcast\/late-night-internet-marketing-mark-mason-affiliate\/id323964382\",\n      \"https:\/\/www.facebook.com\/latenightim\",\n      \"https:\/\/twitter.com\/markmason\"\n    ]\n  },\n  \"publisher\": {\n    \"@type\": \"Organization\",\n    \"name\": \"Late Night Internet Marketing\",\n    \"url\": \"https:\/\/www.latenightim.com\",\n    \"logo\": {\n      \"@type\": \"ImageObject\",\n      \"url\": \"https:\/\/www.latenightim.com\/wp-content\/uploads\/2016\/10\/LNIM-NewLogo1.png\"\n    }\n  },\n  \"mainEntityOfPage\": {\n    \"@type\": \"WebPage\",\n    \"@id\": \"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/\"\n  }\n}\n<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I hear a lot of internet marketing gurus brag about how they cannot even write their own landing pages. They argue that all technical work should be outsourced so you can focus on marketing instead of coding. There is some truth to that, and I am not going to argue with people who have had [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"backup website code","_yoast_wpseo_title":"Always Use Protection When Writing Code: Backup Website Code | LNIM","_yoast_wpseo_metadesc":"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.","_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[39],"tags":[5,7,342,343,21,11,1686,843,25,927,27,29,1174,1688,33,35,1641],"class_list":["post-5484","post","type-post","status-publish","format-standard","hentry","category-blogging","tag-blog","tag-code","tag-core-code","tag-core-engine","tag-garry-conn","tag-guru","tag-internet-marketing","tag-landing-page","tag-marketing","tag-marketing-gurus","tag-money","tag-php","tag-plugins","tag-seo","tag-seoadmax","tag-wordpress","tag-wordpress-theme"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Always Use Protection When Writing Code: Backup Website Code | LNIM<\/title>\n<meta name=\"description\" content=\"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Always Use Protection When Writing Code: Backup Website Code | LNIM\" \/>\n<meta property=\"og:description\" content=\"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/\" \/>\n<meta property=\"og:site_name\" content=\"Late Night Internet Marketing Podcast with Mark Mason\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/masonworld\" \/>\n<meta property=\"article:published_time\" content=\"2008-04-21T17:07:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-04-03T14:42:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.latenightim.com\/wp-content\/uploads\/2016\/06\/latenightlogo.png\" \/>\n\t<meta property=\"og:image:width\" content=\"434\" \/>\n\t<meta property=\"og:image:height\" content=\"208\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Mark Mason\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@masonworld\" \/>\n<meta name=\"twitter:site\" content=\"@masonworld\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Mark Mason\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/\"},\"author\":{\"name\":\"Mark Mason\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#\\\/schema\\\/person\\\/9372eea62aeac9834382c69e9ed9fd90\"},\"headline\":\"Always Use Protection When Writing Code: Why You Need to Backup Website Code\",\"datePublished\":\"2008-04-21T17:07:28+00:00\",\"dateModified\":\"2026-04-03T14:42:17+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/\"},\"wordCount\":595,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#organization\"},\"keywords\":[\"blog\",\"code\",\"core code\",\"core engine\",\"garry conn\",\"guru\",\"Internet Marketing\",\"landing page\",\"marketing\",\"marketing gurus\",\"money\",\"php\",\"plugins\",\"SEO\",\"SEOAdMax\",\"wordpress\",\"wordpress theme\"],\"articleSection\":[\"Blogging\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/\",\"url\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/\",\"name\":\"Always Use Protection When Writing Code: Backup Website Code | LNIM\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#website\"},\"datePublished\":\"2008-04-21T17:07:28+00:00\",\"dateModified\":\"2026-04-03T14:42:17+00:00\",\"description\":\"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/always-use-protection-when-writing-code\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.latenightim.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Always Use Protection When Writing Code: Why You Need to Backup Website Code\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#website\",\"url\":\"https:\\\/\\\/www.latenightim.com\\\/\",\"name\":\"Late Night Internet Marketing Podcast with Mark Mason\",\"description\":\"Building Internet Businesses With Affiliate Marketing One Night At A Time\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.latenightim.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#organization\",\"name\":\"Late Night Internet Marketing Podcast with Mark Mason\",\"url\":\"https:\\\/\\\/www.latenightim.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.latenightim.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/IM-Podcast-700sq.jpg\",\"contentUrl\":\"https:\\\/\\\/www.latenightim.com\\\/wp-content\\\/uploads\\\/2019\\\/03\\\/IM-Podcast-700sq.jpg\",\"width\":700,\"height\":700,\"caption\":\"Late Night Internet Marketing Podcast with Mark Mason\"},\"image\":{\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/masonworld\",\"https:\\\/\\\/x.com\\\/masonworld\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.latenightim.com\\\/#\\\/schema\\\/person\\\/9372eea62aeac9834382c69e9ed9fd90\",\"name\":\"Mark Mason\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g\",\"caption\":\"Mark Mason\"},\"sameAs\":[\"http:\\\/\\\/www.latenightim.com\",\"https:\\\/\\\/x.com\\\/masonworld\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Always Use Protection When Writing Code: Backup Website Code | LNIM","description":"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/","og_locale":"en_US","og_type":"article","og_title":"Always Use Protection When Writing Code: Backup Website Code | LNIM","og_description":"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.","og_url":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/","og_site_name":"Late Night Internet Marketing Podcast with Mark Mason","article_publisher":"https:\/\/www.facebook.com\/masonworld","article_published_time":"2008-04-21T17:07:28+00:00","article_modified_time":"2026-04-03T14:42:17+00:00","og_image":[{"width":434,"height":208,"url":"https:\/\/www.latenightim.com\/wp-content\/uploads\/2016\/06\/latenightlogo.png","type":"image\/png"}],"author":"Mark Mason","twitter_card":"summary_large_image","twitter_creator":"@masonworld","twitter_site":"@masonworld","twitter_misc":{"Written by":"Mark Mason","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/#article","isPartOf":{"@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/"},"author":{"name":"Mark Mason","@id":"https:\/\/www.latenightim.com\/#\/schema\/person\/9372eea62aeac9834382c69e9ed9fd90"},"headline":"Always Use Protection When Writing Code: Why You Need to Backup Website Code","datePublished":"2008-04-21T17:07:28+00:00","dateModified":"2026-04-03T14:42:17+00:00","mainEntityOfPage":{"@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/"},"wordCount":595,"commentCount":4,"publisher":{"@id":"https:\/\/www.latenightim.com\/#organization"},"keywords":["blog","code","core code","core engine","garry conn","guru","Internet Marketing","landing page","marketing","marketing gurus","money","php","plugins","SEO","SEOAdMax","wordpress","wordpress theme"],"articleSection":["Blogging"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/","url":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/","name":"Always Use Protection When Writing Code: Backup Website Code | LNIM","isPartOf":{"@id":"https:\/\/www.latenightim.com\/#website"},"datePublished":"2008-04-21T17:07:28+00:00","dateModified":"2026-04-03T14:42:17+00:00","description":"Mark Mason explains why every website owner needs to understand defensive coding practices, backup website code properly, and test changes before deploying to production.","breadcrumb":{"@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.latenightim.com\/always-use-protection-when-writing-code\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.latenightim.com\/"},{"@type":"ListItem","position":2,"name":"Always Use Protection When Writing Code: Why You Need to Backup Website Code"}]},{"@type":"WebSite","@id":"https:\/\/www.latenightim.com\/#website","url":"https:\/\/www.latenightim.com\/","name":"Late Night Internet Marketing Podcast with Mark Mason","description":"Building Internet Businesses With Affiliate Marketing One Night At A Time","publisher":{"@id":"https:\/\/www.latenightim.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.latenightim.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.latenightim.com\/#organization","name":"Late Night Internet Marketing Podcast with Mark Mason","url":"https:\/\/www.latenightim.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.latenightim.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.latenightim.com\/wp-content\/uploads\/2019\/03\/IM-Podcast-700sq.jpg","contentUrl":"https:\/\/www.latenightim.com\/wp-content\/uploads\/2019\/03\/IM-Podcast-700sq.jpg","width":700,"height":700,"caption":"Late Night Internet Marketing Podcast with Mark Mason"},"image":{"@id":"https:\/\/www.latenightim.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/masonworld","https:\/\/x.com\/masonworld"]},{"@type":"Person","@id":"https:\/\/www.latenightim.com\/#\/schema\/person\/9372eea62aeac9834382c69e9ed9fd90","name":"Mark Mason","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6b800c425c86cd473783904b834b3d5ac57ba0fe956ffc196a60e026d7269008?s=96&d=mm&r=g","caption":"Mark Mason"},"sameAs":["http:\/\/www.latenightim.com","https:\/\/x.com\/masonworld"]}]}},"_links":{"self":[{"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/posts\/5484","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/comments?post=5484"}],"version-history":[{"count":1,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/posts\/5484\/revisions"}],"predecessor-version":[{"id":33150,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/posts\/5484\/revisions\/33150"}],"wp:attachment":[{"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/media?parent=5484"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/categories?post=5484"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.latenightim.com\/wp-json\/wp\/v2\/tags?post=5484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}