wordpress环境安装_为什么暂存环境对于WordPress网站至关重要

news/2024/5/8 12:17:21/文章来源:https://blog.csdn.net/culi3118/article/details/108375043

wordpress环境安装

alt

This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible.

本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。

Have you ever thought about the way you organize your WordPress development? Do you use version control? How about staging environments?

您是否考虑过组织WordPress开发的方式? 您是否使用版本控制? 暂存环境如何?

WordPress开发流程 (The WordPress Development Process)

The advent of WordPress – one of the most consumer-friendly content management systems ever to exist – has created a different kind of development model. The accessibility of WordPress, and pre-made themes and plugins for it, allows web developers to quickly and easily create sites when requirements are low.

WordPress的问世-有史以来最方便消费者使用的内容管理系统之一-创建了一种不同的开发模型。 WordPress的可访问性及其预制的主题和插件,使Web开发人员可以在需求较低时快速轻松地创建网站。

But it goes further than that – some of these developers don’t fully understand the languages on which the platform and their plugins are built (or understand it at all). When considering run-of-the-mill PHP or JavaScript developers, for example, many still don’t practice proper programming techniques, using things like tests, separate environments, or version control. Now, consider that the development of a simple WordPress site can be done by someone with far less training or experience (or done by a veteran programmer with the goal of being hasty). The percentage of cut corners in terms of security and maintenance concerns almost certainly goes up.

但这还不止于此–其中一些开发人员并不完全了解构建平台及其插件所用的语言(或根本不了解)。 例如,当考虑使用常规PHP或JavaScript开发人员时,许多人仍然没有使用测试,单独的环境或版本控制之类的东西来练习适当的编程技术。 现在,考虑到一个简单的WordPress网站的开发可以由受过较少培训或经验的人来完成(或由经验丰富的资深程序员来完成)。 在安全和维护方面,偷工减料的比例几乎肯定会上升。

Bearing all of that in mind, the final nail in the proverbial coffin is the fact that WordPress updates and maintenance can be done so easily from right within the platform. The ability to update the platform or almost any plugin in place is fantastic, but it also means that “Cowboy Coding” – making changes directly on the live site – is very convenient and very tempting. That is, until disaster strikes.

牢记所有这些,众所周知的棺材里最后一个钉子就是事实,即可以在平台内轻松地完成WordPress更新和维护。 能够更新平台或几乎任何可用的插件的能力都很棒,但这也意味着“牛仔编码”(直接在实时站点上进行更改)非常方便且非常诱人。 也就是说,直到灾难来临。

关于暂存环境 (About Staging Environments)

The life cycle of many WordPress websites begins in a separate development environment in which it is built (hopefully it isn’t being built right in a live production environment). Once built, it is migrated to a production environment. And that is where things can sometimes fall apart.

许多WordPress网站的生命周期始于构建它的单独开发环境中(希望它不是在实时生产环境中构建的)。 构建完成后,将其迁移到生产环境。 那就是事情有时会崩溃的地方。

What if the live, production hosting is slightly different than the dev environment, is missing some dependencies or software, has different versions, etc? Or what if updating a plugin causes the site to crash? What if a theme update breaks your child theme and you can’t immediately diagnose what is wrong?

如果实时的生产托管与开发环境略有不同,缺少某些依赖项或软件,版本不同,该怎么办? 或者,如果更新插件导致网站崩溃怎么办? 如果主题更新破坏了您的子主题并且您无法立即诊断出问题怎么办?

These problems can be often prevented by using staging environments, which are often overlooked by WordPress site managers, yet are just as important for them as for other web platforms.

通常可以通过使用暂存环境来防止这些问题,暂存环境经常被WordPress站点管理员所忽略,但对他们而言,与其他Web平台一样重要。

设置暂存环境 (Setting up a Staging Environment)

The goal behind setting up a staging environment is to set it up to be as identical to your live production environment as possible. Use the same hosting service, or the same kind of VPS. Mimic the live environment as closely as possible. use the same WordPress version, the same plugins, and the same configuration. One neat tip would be to use a backup/migration plugin to create a mirror copy of your website when it is first created (or do so now, if you have an existing site but no staging environment) so that the two are identical to start. Then, you can set up a subdomain (or another domain altogether) to access the site, such as staging.example.com.

设置暂存环境的目的是将其设置为与实际生产环境尽可能相同。 使用相同的托管服务或相同类型的VPS。 尽可能模拟生活环境。 使用相同的WordPress版本,相同的插件和相同的配置。 一个巧妙的技巧是使用备份/迁移插件在首次创建网站时创建网站的镜像副本(或者,如果您已有站点但没有暂存环境,则现在进行此操作),以便两者相同即可启动。 然后,您可以设置一个子域(或总共另一个域)来访问该站点,例如staging.example.com

Once you have the staging site, using it is simple. Any time you want to make changes on your production site, simply make them to the staging site first. Look for major issues when updating themes or styles. Test for problems in functionality when updating things like carts or other more detailed plugins or custom code. Ensure that permalinks are still working after a change. When updating the WordPress platform and plugins, do them here first as well. That way if something goes wrong… you can catch it before it’s on the site that everyone actually cares about!

拥有暂存站点后,使用它很简单。 任何时候要在生产站点上进行更改,只需先将它们更改到登台站点即可。 更新主题或样式时查找主要问题。 在更新购物车或其他更详细的插件或自定义代码之类的东西时,测试功能方面的问题。 确保更改后永久链接仍在工作。 更新WordPress平台和插件时,也请先在此处进行操作。 这样,如果出现问题,您可以在每个人真正关心的站点上将其发现!

选择托管 (Choosing Hosting)

You’ll want to choose a host that accommodates your needs. For those of you who are familiar with web server management, spinning up a second VPS when you have need of a staging site is an adequate solution. Depending on how often you make changes, you could even shut it down and save some money while you’re between development cycles!

您将要选择适合您需求的主机。 对于那些熟悉Web服务器管理的人来说,在需要临时站点时再启动另一个VPS是一个合适的解决方案。 根据您进行更改的频率,您甚至可以在开发周期之间关闭它并节省一些钱!

If you have shared hosting, you’ll be looking for a host who provides this sort of thing out of the box, to avoid having to set up two mirrored shared hosting accounts or packages. Some web hosts provide this kind of functionality as part of their hosting package, and it’s ever so easy to use. Our hosting provider such as SiteGround does this, and they have a tutorial that will walk you through using their staging environment, if you’re interested. We’ve also just published a tutorial on keeping your development and live WordPress environments synchronized.

如果您拥有共享主机,则将寻找一个开箱即用的主机来提供此类服务,以避免必须设置两个镜像的共享主机帐户或软件包。 一些网络主机在其主机软件包中提供了此类功能,并且使用起来如此简单。 我们的托管服务提供商(例如SiteGround)可以做到这一点,并且如果您感兴趣的话,他们还将提供一个教程 , 指导您使用其暂存环境。 我们还刚刚发布了有关使您的开发和实时WordPress环境保持同步的教程。

Regardless of your situation, if you aren’t using a staging environment to try out your changes before they hit production – get started doing that today!

无论您遇到什么情况,如果您没有在过渡环境中试用更改之前就将它们投入生产,那就立即开始吧!

翻译自: https://www.sitepoint.com/why-staging-environments-are-critical-for-wordpress-sites/

wordpress环境安装

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.luyixian.cn/news_show_785192.aspx

如若内容造成侵权/违法违规/事实不符,请联系dt猫网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

什么是您网站的正确图像格式?

This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible. 本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。 As of March 2017, images m…

seo服务端渲染_我应该向SEO服务收取多少费用?

seo服务端渲染Good SEO might be the very reason you’re reading this article. As its name implies, SEO is the process of optimizing a website or web page to maximize visibility in search engine results, and it is hugely important for any business that maint…

wordpress 邮件_将您的WordPress网站变成电子邮件营销机器

wordpress 邮件With over 35,000 plugins available, there are few things that you cannot do with WordPress. 有超过35,000个可用的插件,几乎没有WordPress无法做的事情。 For many site builders, the ultimate goal is to reach as many viewers as possible…

微信小程序选择图片优化_如何选择完美的图像格式来优化您的网站

微信小程序选择图片优化This article was sponsored by Cloudinary. Thank you for supporting the partners who make SitePoint possible. 本文由Cloudinary赞助。 感谢您支持使SitePoint成为可能的合作伙伴。 When adding images to a website, most of us will instinctiv…

Visual Studio Community 2015:设置网站

This article was sponsored by Microsoft. Thank you for supporting the sponsors who make SitePoint possible. 本文由Microsoft赞助。 感谢您支持使SitePoint成为可能的赞助商。 For this series of articles, we’re going to use Microsoft’s modern IDE: Visual Stud…

wordpress移动_如何轻松地将WordPress网站转换为移动应用程序

wordpress移动Whether you are an advanced or novice WordPress user, for many companies and organizations, having an mobile app for your website can be a huge asset for improving overall reach. Unfortunately mobile development typically is a labor intensive …

八岐大蛇蛇的伤害算谁的伤害_避免诱惑损害网站性能

八岐大蛇蛇的伤害算谁的伤害SitePoint recently published Lean Websites, by Barbara Bermes—a book that presents the latest techniques for improving web page performance. In this article, Barbara details some of the performance pitfalls that all too often cat…

css gpu加速_五个CSS性能工具可加速您的网站

css gpu加速This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible. 本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。 In this article…

php网站开发架构_PHP的干净代码架构和测试驱动开发

php网站开发架构The Clean Code Architecture was introduced by Robert C. Martin on the 8light blog. The idea was to create an architecture which is independent of any external agency. Your business logic should not be coupled to a framework, a database, or t…

小型企业服务器选择_小型企业的最佳免费和廉价网站选择

小型企业服务器选择Not long ago, if you wanted a website, you had to be willing to shell out at least a few grand for the most basic of static sites. I remember about ten years ago at a firm I worked for, quotes for ecommerce sites, or sites with other dyna…

cms数据库设计_使用Statamic CMS构建无数据库的网站

cms数据库设计A content management system (CMS) is a package of code around which you build a dynamic website—with components that change, adapt and update automatically, in contrast to a hard-coded, static site. 内容管理系统(CMS)是一揽子代码,您…

编辑器生成静态网页_使用静态网站生成器的7个理由

编辑器生成静态网页Static site generators have become increasingly popular and, if my prediction is correct, usage will explode during 2016. Let’s establish what we mean by the term “static site generator” … 静态站点生成器已变得越来越流行,如果…

wordpress 自定义_为您的WordPress网站设计自定义主页

wordpress 自定义WordPress is used on a large portion of sites on the web. It allows us to create a variety of different types of sites, but one of the most important components of any website is always the home page. The perfect landing page will help you …

编辑器生成静态网页_不使用静态网站生成器的7个理由

编辑器生成静态网页Trending posts on SitePoint today: 今天在SitePoint上的热门帖子: 7 Ways to Make WordPress Simpler for Users 为用户简化WordPress的7种方法 I Need a Website. What Do I Need to Know About Hosting? 我需要一个网站。 关于托管我需要了…

wordpress插件_审查的顶级WordPress SEO插件

wordpress插件WordPress provides great native SEO features, so might your theme. However, by using a dedicated SEO plugin (and knowing how to use it) we can further optimize our site. In this article we compare the top SEO plugins for WordPress side-by-side…

如何安装和使用WP-CLI来管理WordPress网站

Speeding up your work process should be one of your top priorities. Simply put, if you do more work in less time, then you will have more time to work on more projects, study and rest. 加快工作流程应该是您的首要任务之一。 简而言之,如果您用更少的…

wordpress快速建站_快速提示:使用WordPress联络表7增强选择加入

wordpress快速建站You might have heard the saying, “the money is in the list”. Your email list, to be exact. Email marketing is widely considered to be the most powerful form of marketing today, and there are plenty of stats to back it up. 您可能已经听说过…

php网站功能块学习_学习PHP 7,了解新功能等

php网站功能块学习PHP 7, the next version of the world’s most popular programming language, has been released. We’d love to shoot fireworks and get drunk with our newfound power (seriously, the language is in the true big leagues now, functionality and pe…

wordpress网站迁移_如何将您的WordPress网站迁移到新的托管服务提供商

wordpress网站迁移This article is part of a series created in partnership with SiteGround. Thank you for supporting the partners who make SitePoint possible. 本文是与SiteGround合作创建的系列文章的一部分。 感谢您支持使SitePoint成为可能的合作伙伴。 We’ve be…

wordpress 静态化_地理定位WordPress内容以个性化您的网站

wordpress 静态化So what does that phrase mean, “Geo-Targeting WordPress Content”? First, let’s back up and look at an example of personalization. 那么,这句话是什么意思,“以地理定位的WordPress内容”? 首先,让我…