{"id":4456,"date":"2014-05-17T09:49:25","date_gmt":"2014-05-17T09:49:25","guid":{"rendered":"http:\/\/demo.momizat.net\/goodnews\/?p=124"},"modified":"2014-05-17T09:49:25","modified_gmt":"2014-05-17T09:49:25","slug":"deployment-of-wordpress-websites","status":"publish","type":"post","link":"https:\/\/bulandrashtrawadi.in\/?p=4456","title":{"rendered":"Improve The Deployment Of WordPress Websites"},"content":{"rendered":"<p>To Improve The Deployment Of WordPress Websites As WordPress matures into a full-fledged CMS and more and more<strong>large online publishers come to rely on the platform<\/strong>, the practice of developing and deploying websites becomes increasingly important. High-profile members of the WordPress community, such as core developer Mark Jaquith and Cristi Burca, have <a href=\"http:\/\/wordpress.tv\/2011\/08\/20\/mark-jaquith-scaling-servers-and-deploys-oh-my\/\">spoken on the topic<\/a> and built tools such as <a href=\"https:\/\/github.com\/wp-cli\/wp-cli\">WP-CLI<\/a> and <a href=\"https:\/\/github.com\/markjaquith\/WP-Stack\">WP Stack<\/a> to improve the professionalism of our administration and deployment.<\/p>\n<p>But what I\u2019m really interested in is the current state of WordPress deployment: how an average developer manages the deployment of their websites, and how can we improve as a community?<\/p>\n<p>In late July 2012, <strong>I conducted a short survey to help me answer these questions<\/strong>. The survey was open for three months and drew a modest but not insignificant 327 respondents. This article documents the results of the survey and draws some conclusions about where education is needed and how we can help each other become more professional when deploying our WordPress websites.<\/p>\n<h3>The Demographic<\/h3>\n<p>In my survey, I asked a few questions to establish the demographic that\u2019s working with WordPress; this was obviously already done in far greater detail with the <a href=\"http:\/\/www.smashingmagazine.com\/2013\/04\/15\/wordpress-deployment-survey\/#\">WordPress user and developer survey<\/a>, but I felt that getting a sense of who was responding to this survey was important. Of the 327 respondents, 43% self-identified as developers, 10% as designers, 40% as both designers and developers and 7% other.<\/p>\n<p>The vast majority were located in the North America (50%) and Europe (38%), with the following continents also registering: Asia (6%), Australia (4%), Africa (3%) and South America (1%). I also asked respondents <strong>how they would categorize the businesses they work for<\/strong>. Here\u2019s how they responded:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-108718\" src=\"http:\/\/media.mediatemple.netdna-cdn.com\/wp-content\/uploads\/2013\/03\/biz-type.jpg\" alt=\"biz-type\" \/><\/p>\n<p>The <strong>results were overwhelmingly in favor of freelancing (46%)<\/strong>, with small businesses (19%) and small agencies (17%) taking a close second and third place, respectively. These figures back up accepted knowledge that WordPress is largely used by small internal Web teams, regional Web agencies and freelancers. Finally, as with the WordPress user and developer survey, I asked respondents whether they made their living from WordPress. This was relatively evenly split, with a small majority of 59% saying yes.<\/p>\n<p>That said, of those who identified themselves as developers, 67% said they earn their living from WordPress, which suggests that WordPress developers are generally more inclined to stick with one platform than designers, who are perhaps more agonistic.<\/p>\n<h3>Deployment Practices<\/h3>\n<p>Now we get to the meat of the survey, how respondents actually deploy their WordPress websites. Combined, the 327 respondents maintain 6,378.5 WordPress websites \u2014 yes, someone maintains half a WordPress website. The majority of respondents manage a fairly small number of websites, with 46% looking after fewer than 10. That said, an impressive 8% manage between 30 and 40 websites, and, incredibly, one person is responsible for 700. Below is a breakdown of the numbers.<\/p>\n<h4>WEBSITES MAINTAINED BY SURVEY RESPONDENTS<\/h4>\n<table class=\"table-overview\">\n<tbody>\n<tr>\n<th><strong>Number of websites<\/strong><\/th>\n<th><strong>Number of respondents<\/strong><\/th>\n<\/tr>\n<tr>\n<td>Fewer than 10<\/td>\n<td>149<\/td>\n<\/tr>\n<tr>\n<td>10 \u2013 20<\/td>\n<td>109<\/td>\n<\/tr>\n<tr>\n<td>20 \u2013 30<\/td>\n<td>26<\/td>\n<\/tr>\n<tr>\n<td>50 \u2013 100<\/td>\n<td>7<\/td>\n<\/tr>\n<tr>\n<td>100 \u2013 200<\/td>\n<td>4<\/td>\n<\/tr>\n<tr>\n<td>200 \u2013 500<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>500 \u2013 1000<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>VERSION CONTROL<\/h4>\n<p>I asked all respondents whether they use version control and, if so, which software they favor. Astonishingly (at least to me), 45% of respondents said they do not use version-control software at all as part of their workflow. Of the remaining 55%, <strong>Git was by far the most popular<\/strong>, taking 41% of the vote, and Subversion surprisingly accounted for only 9%. Drilling down a little deeper, 28% of those who identify themselves as a developer stated that they do not use version control, and 48% of those who are both developers and designers said the same. Here\u2019s a breakdown of overall responses on version-control software:<\/p>\n<p><img decoding=\"async\" class=\"alignnone size-full wp-image-108719\" src=\"http:\/\/media.mediatemple.netdna-cdn.com\/wp-content\/uploads\/2013\/03\/version-control.jpg\" alt=\"version-control\" \/><\/p>\n<p>Next, I asked respondents what method of deploying websites they favor. These I broke down into FTP, SFTP, SCP, SSH + version control, SSH + version control + Capistrano, and other. Again, <strong>somewhat shocking for me was to find that FTP took 49% of the vote<\/strong>, followed by SFTP (20%) and SSH + version control (17%). My preferred method, SSH + version control + Capistrano, got only 3% of the vote; but even with so low a number, I was pretty encouraged to hear that people out there take the time to work in this manner.<\/p>\n<h4>ENVIRONMENTS<\/h4>\n<p>I asked respondents whether they maintain different environments for their WordPress websites \u2014 that is, whether they set up local, test, staging and live environments. Answering yes didn\u2019t require that they run all of these environments, but simply that they differentiate between the website they develop on, the website on which they show changes to a client and the live website. The vast majority of respondents (75%) indeed do this, which is great news.<\/p>\n<p>An important facet and constant pain point of running multiple environments is the need to alter URLs in the WordPress database when migrating the database from one environment to another. I asked respondents how they typically deal with this problem and gave them an open field to type their answer. Here are some answers that came up repeatedly. These aren\u2019t actual responses, but rather my representation of groups of similar replies.<\/p>\n<blockquote><p>\u201cI don\u2019t migrate between staging and live databases.\u201d<\/p><\/blockquote>\n<blockquote><p>\u201cI don\u2019t touch the database. I just export and import posts out of and into WordPress.\u201d<\/p><\/blockquote>\n<blockquote><p>\u201cI use Dave Coveney\u2019s PHP script for finding and replacing URLs in the database, including those in serialized data.\u201d<\/p><\/blockquote>\n<blockquote><p>\u201cI do a find-and-replace on the SQL dump and the website\u2019s files.\u201d<\/p><\/blockquote>\n<blockquote><p>\u201cIt\u2019s a massive pain in the arse, and I steer clear of it.\u201d<\/p><\/blockquote>\n<blockquote><p>\u201cI dunno. What is the best practice on this?\u201d<\/p><\/blockquote>\n<h4>COWBOY CODING<\/h4>\n<p>Finally, to gauge how strictly people adhere to general best practices, I asked respondents whether they ever cheekily edit code on the live server. Let\u2019s be honest: this question is only ever going to yield one outcome. As expected, a whopping 76% owned up to having tweaked some WordPress production code in their time.<\/p>\n<h3>What We\u2019ve Learned<\/h3>\n<p>In reviewing the lessons learned, it\u2019s important to say up front that I am not criticizing the development and deployment practices of the survey\u2019s respondents. The goal was to identify the areas where we, as a community, can become more professional and to draw some conclusions on how we might achieve that. You\u2019ll find no finger-wagging or hyper-critical feedback for developers \u2014 just broad conclusions drawn from the responses.<\/p>\n<h4>VERSION CONTROL<\/h4>\n<p>First, clearly not enough of us are using version control in our everyday workflow. This is a fundamental tool for any developer, and for 61% of those who self-identify as a developer or as both a designer and developer to say that they don\u2019t use version control indicates that effort is needed in the WordPress community to educate developers on the importance of source-control management.<\/p>\n<p>Still, while not enough WordPress developers use version control, that so many who do use Git is very positive. I prefer the decentralized approach of Git, and while WordPress\u2019 core team still uses (and will likely continue to use) Subversion, <strong>Git brings many benefits<\/strong>. Suppose a few teams are working on a project. Each team could write to its own repository, and then a senior member of the quality-assurance team or an administrator could merge changes from all of those repositories into a protected repository before deploying the website. This approach makes a lot of sense if the website you\u2019re working on is large and members of your team are dispersed, and it\u2019s why I favor Git.<\/p>\n<h4>ENVIRONMENTS<\/h4>\n<p>While a lot has been done to grapple with the issues arising from WordPress storing URLs in the database, the problem goes beyond WordPress\u2019 core and extends to plugins and even to the pesky URLs ending up in serialized data. This is a pain in the arse at best, and a complete time-suck at worst. There are many options for overcoming this, but the most common choice is either not to migrate data from environment to environment at all <strong>or to use Dave Coveney\u2019s PHP script<\/strong>. Both have their problems. For me, the first just isn\u2019t viable, and the second, while perfectly acceptable, isn\u2019t automated enough and is pretty time-consuming. There has to be a better option.<\/p>\n<p>Free and premium tools and plugins offer solutions to this problem. One that came up a lot in the survey\u2019s results was BackupBuddy and its migration feature. I\u2019ve played around with its functionality, and, while it works perfectly well, it does not (as yet) work with Multisite, and I actually found the process more arduous than using a find-and-replace script. One project of mine that has emerged from this survey is to automate the find-and-replace process with a tool for Capistrano.<\/p>\n<p>from :http:\/\/www.smashingmagazine.com\/2013\/04\/15\/wordpress-deployment-survey\/<\/p>\n<blockquote class=\"mom_quote \" style=\"font-family:verdana;font-size:14px;font-style:italic;border-left-color:#dd9933; color:#474747; background-color:#F5F5F5; \"><span class=\"quote-arrow\" style=\"border-left-color:#dd9933;\"><\/span>This Demo Content Brought to you by <a href=\"http:\/\/momizat.com\/\" target=\"_blank\" rel=\"dofollow noopener\">Momizat Team<\/a> <\/blockquote>\n<h2>this is tags and keywords : wordpress themes momizat Tutorial wordpress  templates<\/h2>\n","protected":false},"excerpt":{"rendered":"<p>To Improve The Deployment Of WordPress Websites As WordPress matures into a full-fledged CMS and more and morelarge online publishers come to rely on the platform, the practice of developing and deploying websites becomes increasingly important. High-profile members of the WordPress community, such as core developer Mark Jaquith and Cristi Burca, have spoken on the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":125,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[75,76,78,79,80],"_links":{"self":[{"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/posts\/4456"}],"collection":[{"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4456"}],"version-history":[{"count":0,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/posts\/4456\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=\/wp\/v2\/media\/125"}],"wp:attachment":[{"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4456"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4456"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bulandrashtrawadi.in\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4456"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}