失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > wordpress入门主题_设置和运行WordPress网站的终极入门指南

wordpress入门主题_设置和运行WordPress网站的终极入门指南

时间:2019-08-11 18:45:10

相关推荐

wordpress入门主题_设置和运行WordPress网站的终极入门指南

wordpress入门主题

So you’ve decided to run a WordPress site but have no idea where to start? This tutorial is aimed at absolute beginners. Some IT knowledge will help but I presume you want to learn the essentials within a few hours. Let’s get started.

因此,您决定运行WordPress网站,但不知道从哪里开始?本教程面向绝对的初学者。一些IT知识会有所帮助,但我想您想在几个小时内学习基本知识。让我们开始吧。

步骤1:您想达成什么目标? (Step 1: What Do You Want to Achieve?)

A little planning goes a long way. Be honest with yourself:why are you considering WordPress?Do you want to:

稍作计划会大有帮助。 老实说:您为什么考虑使用WordPress?你想要_____吗:

create a business website?创建一个商业网站? document your life, hobby or interests?记录您的生活,爱好或兴趣? start an amazing web design agency?成立一家出色的网页设计公司? learn to write code?学习写代码? do something else?还有其他事吗

WordPress is flexible and runs almost a third of the web —but it’s not ideal for every situation. A website or article library is perfect. Creating a social network or online shop is possible but there may be better options. Using WordPress to learn PHP could be a frustrating experience.

WordPress是灵活的,几乎可以在网络上运行三分之一,但是并不是在每种情况下都理想。 一个网站或文章库是完美的。 创建社交网络或在线商店是可能的,但可能会有更好的选择。 使用WordPress学习PHP可能会令人沮丧。

Presuming WordPressisappropriate, are you interested in the technicalities or would you simply prefer to write content? If it’s the latter, a managed WordPress plan from SiteGround or an account at will get you running without the hassles of installation and server management.

假设WordPress是合适的,您对技术性感兴趣还是只想编写内容? 如果是后者,则可以使用SiteGround托管的WordPress计划或上的帐户来运行,而不必担心安装和服务器管理的麻烦。

The moral:define the problem before choosing a solution!

道德:选择解决方案之前先定义问题!

步骤2:计划内容 (Step 2: Plan Your Content)

Ideally, you should have all your content written before building a site. It’s the best way to plan a structure and will influence your design. No one ever does that, but at least plan a few general concepts so you have somewhere to start.

理想情况下,在构建站点之前,应先编写所有内容。 这是规划结构并影响设计的最佳方法。 从来没有人这样做,但是至少要计划一些通用概念,以便您有一个起点。

步骤3:购买域名 (Step 3: Purchase a Domain Name)

A domain name is your primary web address, e.g. . Keep it short and use keywords appropriate to your content. This can be tougher than it sounds; most good names were registered years ago.

域名是您的主要网址,例如。 请保持简短,并使用适合您内容的关键字。 这可能比听起来要难。 多数好名字是几年前注册的。

Use a reputable domain registrar, like Hover. Prices vary across countries and top-level-domain types (.com, .net, .org, .ninja etc), but expect to pay around $25 for a new domain for a couple of years. Buying a decent pre-registered domain from someone else can be considerably more expensive.

使用信誉良好的域名注册商,例如Hover。 价格因国家/地区和顶级域名类型(.com,.net,.org,.ninja等)而异,但预计未来几年会为新域名支付25美元左右。 从其他人那里购买一个不错的预注册域名可能会更加昂贵。

推荐域名注册 (Recommended Domain Name Register)

Find the perfect domain name for your idea at Hover.在悬停处找到适合您想法的完美域名。 Hover 徘徊Get 10% off now.现在享受10%的折扣。

How to Choose a Domain Name for Your Business

如何为您的企业选择域名

How to Choose, Register and Make the Most of Your Domain Name

如何选择,注册和充分利用您的域名

12 Tools to Help You Buy the Perfect Domain Name

12种帮助您购买完美域名的工具

Your Domain Name: Do You www or Not?

您的域名:您是否www?

步骤4:购买托管计划 (Step 4: Purchase a Hosting Plan)

Your site needs to be hosted somewhere. Its files must be placed on a device which understands how to deal with web requests:a web server. You could serve everything from your desktop PC but it quickly becomes impractical.

您的网站需要托管在某个地方。 它的文件必须放在理解如何处理Web请求的设备上:Web服务器。 您可以从台式PC提供所有服务,但很快就变得不切实际。

Buy a suitable plan from a respected host such as SiteGround. A WordPress-compatible shared hosting plan costs a few dollars a month and you can upgrade disk space and bandwidth as traffic grows.

从受尊敬的主机(例如SiteGround)购买合适的计划。 兼容WordPress的共享托管计划每月花费几美元,随着流量的增长,您可以升级磁盘空间和带宽。

推荐的网页寄存 (Recommended Web Hosting)

Fast. Scalable. Managed Hosting. 65% Off Today. 快速。 可扩展 托管托管。 今天有65%的折扣。 SiteGround SiteGroundGet up to 65% off now.现在最多可获得65%的折扣。

You will then need to ‘point’ your domain at your new web space. This is normally done by logging into your domain registrar’s control panel then either:

然后,您需要将您的域“指向”您的新网站空间。 通常,这是通过登录您的域名注册商的控制面板来完成的,然后:

Setting the host as the DNS nameserver, or将主机设置为DNS名称服务器,或者 Changing the domain’s DNS A records to point at the host’s IP address.更改域的DNS A记录以指向主机的IP地址。

All hosts and domain registrars provide guidance but you may need to seek expert assistance. Domain changes can take up to 48 hours to propagate so you may need to wait before moving to the next step.

所有主机和域名注册商都提供指导,但您可能需要寻求专家帮助。 域更改最多可能需要48个小时才能传播,因此您可能需要等待一段时间才能继续进行下一步。

Web Hosting & Domains

虚拟主机和域名

The Ultimate Guide to Choosing a Hosting Provider

选择托管服务提供商的终极指南

What Sort of Hosting Should I Choose for My Website?

我应该为我的网站选择哪种托管?

What Do I Need to Know About Hosting?

关于托管我需要了解什么?

步骤5:设定SSL (Step 5: Set Up SSL)

Secure Socket Layer (SSL) certificates enable cryptographic protocols on your website so it is served over anhttps://address rather than http://. All communication between your server and the user’s browser is encrypted so it cannot be (easily) intercepted by a third party.

安全套接字层(SSL)证书在您的网站上启用了加密协议,因此通过https://地址而不是http://提供服务。 您的服务器与用户浏览器之间的所有通信均经过加密,因此第三方无法(轻松地)拦截它。

Configuring SSL is an optional step but highly recommended:

配置SSL是可选步骤,但强烈建议:

Browsers warn when a site is not secure especially when completing forms or sending data.当站点不安全时,尤其是在填写表格或发送数据时,浏览器会发出警告。 Search engines rank secure sites higher than non-secure equivalents.搜索引擎对安全站点的排名高于非安全站点。

SSL is essential if you eventually want a Progressive Web App which allows your site to be “installed” and work offline.

如果您最终想要一个渐进式Web应用程序 ,该应用程序允许“安装”网站并脱机工作,则SSL是必不可少的。

Adding SSL later is considerably more difficult. You may need to reinstall WordPress and search engine indexing can be affected.以后添加SSL要困难得多。 您可能需要重新安装WordPress,搜索引擎索引编制可能会受到影响。

There are no disadvantages. HTTPS can be added for free and is negligibly slower than unencrypted HTTP (it can be considerably faster when used with HTTP/2).

没有缺点。 可以免费添加HTTPS,并且与未加密的HTTP相比,HTTPS的速度可以忽略不计( 与HTTP / 2结合使用时,它的速度可以大大提高 )。

Hosts often allow you to install a certificate purchased elsewhere, but it’s easier to use their own service. For example, SiteGround provides a freeLet’s Encryptoption in the security section of your site’s cPanel. Click that, hitInstalland SSL is enabled.

主机通常允许您安装在其他地方购买的证书,但是使用自己的服务更容易。 例如, SiteGround在站点的cPanel的“安全性”部分中提供了免费的“加密”选项。 单击该按钮,单击“安装”,然后启用SSL。

Why Every Website Needs HTTPS

为什么每个网站都需要HTTPS

How to Secure WordPress with SSL

如何使用SSL保护WordPress

What is HTTP/2?

什么是HTTP / 2?

步骤6:安装WordPress (Step 6: Install WordPress)

WordPress is a complex application which requires:

WordPress是一个复杂的应用程序,它需要:

A back-end MySQL database where your configuration, posts, comments and other information is retained. This must be installed and configured first. A database user ID and password must be defined so applications can store and retrieve data.一个后端MySQL数据库,其中保留您的配置,帖子,评论和其他信息。 必须首先安装和配置。 必须定义数据库用户ID和密码,以便应用程序可以存储和检索数据。 A large set of PHP files which form the WordPress application. These must be copied to the server prior to running a set-up procedure. This requests the database credentials before creating the database tables and initial data.构成WordPress应用程序的大量PHP文件。 在运行设置过程之前,必须将这些文件复制到服务器。 这将在创建数据库表和初始数据之前请求数据库凭据。 After installation, WordPress communicates with the database using the ID and password to enable editing and presentation of pages.安装后,WordPress使用ID和密码与数据库进行通信以启用页面的编辑和呈现。

The majority of hosts provide cPanel – a popular website management facility. You can create your database, upload WordPress and install manually. For full instructions, refer to How to Create WordPress MySQL Databases on cPanel.

大多数主机提供cPanel –一种流行的网站管理工具。 您可以创建数据库,上传WordPress并手动安装。 有关完整说明,请参阅如何在cPanel上创建WordPress MySQL数据库 。

Fortunately, there is an easier option. Search or browse for the WordPress options in cPanel:

幸运的是,有一个更简单的选择。 搜索或浏览cPanel中的WordPress选项:

Click theWordPress Installerto open the installation panel:

单击WordPress安装程序以打开安装面板:

Define the following settings:

定义以下设置:

https://for theprotocolif you enabled SSL in step 5. (You can also choose whether the domain uses the initial ‘www’ or not).

如果在步骤5中启用了SSL,则为协议使用https://。(您还可以选择域是否使用初始的“ www”)。

Your primarydomain. (There will only be one choice unless you have multiple domains pointed at the hosting plan).

您的主域名。 (除非您有多个指向托管计划的域,否则只有一种选择)。

Thedirectoryshould be left blank to install WordPress in the root folder. Only change this if you want to run it from another folder, e.g. /blog/

目录应留空以将WordPress安装在根文件夹中。 仅当要从另一个文件夹(例如/blog/)运行时,才更改此设置

Thenameanddescriptionof your new site.

您的新站点的名称描述

KeepMultisiteunchecked unless you’re intending to run more than one WordPress site on the same space.

除非您打算在同一空间上运行多个WordPress站点,否则请不要选中Multisite

Enter anAdmin UsernameandPassword. You will use these to log into WordPress so ensure they’re strong (NOT‘admin’ and ‘password’!) and you keep them in a safe place.

输入管理员用户名密码。 您将使用它们来登录WordPress,因此请确保它们坚固(而不是“ admin”和“ password”!),并将它们放在安全的地方。

Enter yourEmail. WordPress uses this to send you notifications when necessary.

输入您的电子邮件。 WordPress在必要时使用它向您发送通知。

The other options can normally be left as the default settings. HitInstalland wait a few minutes for the installation process to complete. You will be given a link to the main site (/) and the WordPress control panel (/wp-admin) where you can log in with your administrative username and password.

其他选项通常可以保留为默认设置。 点击“安装”,等待几分钟,以完成安装过程。 您将获得一个指向主站点(/)和WordPress控制面板(/wp-admin)的链接,您可以在其中使用管理用户名和密码登录。

步骤7:初始WordPress配置 (Step 7: Initial WordPress Configuration)

Don’t be tempted to start publishing content just yet! It’s best to configure WordPress from theSettingsmenu before going further:

暂时不要尝试开始发布内容! 最好在“设置”菜单上配置WordPress,然后再进行以下操作:

The following sections describe the basic WordPress settings but note that installed themes and plugins can override these options.

以下各节介绍了WordPress的基本设置,但请注意,已安装的主题和插件可以覆盖这些选项。

一般 (General)

This pane allows you to change various aspects about your installation. The primary settings to change include:

该窗格允许您更改有关安装的各个方面。 要更改的主要设置包括:

TheTimezone. This may default to UTC so choose an appropriate city instead.

时区。 这可能默认为UTC,所以请选择合适的城市。

TheDate Format. Choose an appropriate option or enter a custom string using PHP’s date format

日期格式。 选择一个适当的选项或使用PHP的日期格式输入自定义字符串

TheTime Format. Similarly, choose an option or enter your own.

时间格式。 同样,选择一个选项或输入您自己的选项。

Remember to hitSave Changesonce finished.

完成后,请记住点击保存更改

写作 (Writing)

The main settings to change in this pane are:

在此窗格中要更改的主要设置是:

TheDefault Post Category. Post categories are defined inPosts>Categories.

默认帖子类别。 发布分类在帖子定义>类别

TheDefault Post Format. WordPress themes often provide different post types such as standard articles, galleries and video pages. Choose whichever you will use most often.

默认帖子格式。 WordPress主题通常提供不同的帖子类型,例如标准文章,画廊和视频页面。 选择最常使用的那个。

读 (Reading)

TheFront page displayssetting allows you to set whether your latest posts or a static page is presented on the home page.

首页显示”设置使您可以设置是否在首页上显示最新帖子或静态页面。

The other default settings are normally fine, although you may want to temporarily disableSearch Engine Visibilityduring the initial stages of building your site.Don’t forget to enable it before going live!

其他默认设置通常很好,尽管您可能希望在构建网站的初始阶段临时禁用“搜索引擎可见性”。不要忘记在启用之前启用它!

讨论区 (Discussion)

This pane controls commenting. The main setting isAllow people to post comments on new articleswhich you may want to disable if you don’t require comments.

该窗格控制评论。 主要设置是“允许人们在新文章上发表评论,如果不需要评论,则可能要禁用它”。

媒体 (Media)

The pane allows you to set default sizes for large images, medium images and thumbnails. The defaults are reasonable but, the smaller your image dimensions, the smaller the file size and the faster your site will download.

该窗格允许您为大图像,中图像和缩略图设置默认大小。 默认值是合理的,但是图像尺寸越小,文件大小越小,网站下载速度越快。

固定链接 (Permalinks)

Permalinks are the URLs given to WordPress posts. The default is often a plain /?p=123 which will not help your keyword-rich search engine optimization efforts!

永久链接是给WordPress帖子的URL。 默认值通常是简单的/?p=123,这将不利于您的关键字丰富的搜索引擎优化工作!

Set the permalink toPost nameor something appropriate for your site.

将永久链接设置为发布名称或适合您网站的名称。

步骤7:设置用户帐户 (Step 7: Set Up User Accounts)

During installation, WordPress creates a single administrator account which has unrestricted access to all control panel functions. Never share those credentials: set up separate accounts for everyone who needs access.

在安装过程中,WordPress将创建一个管理员帐户,该帐户可以不受限制地访问所有控制面板功能。 永远不要共享这些凭据:为需要访问的每个人设置单独的帐户。

Users are the weakest point of any system — especially when they can choose their own simple passwords and happily pass credentials to anyone who asks! WordPress offers a range of roles and capabilities and it’s rarely necessary to give anyone administrative access. Even if you are the only content editor, it’s advisable to create another account specifically for daily writing and publishing tasks.

用户是任何系统中最薄弱的环节-尤其是当他们可以选择自己的简单密码并愉快地将凭据传递给提出要求的任何人时! WordPress提供了多种角色和功能 ,几乎不需要授予任何管理员访问权限。 即使您是唯一的内容编辑器,也建议您创建一个专门用于日常编写和发布任务的帐户。

In most cases, users should be either:

在大多数情况下,用户应为:

anEditor: someone who can publish and manage their own and other people’s posts

编辑者:可以发布和管理自己和其他人的帖子的人

anAuthor: someone who can publish and manage their own posts, or

作者:可以发布和管理自己的帖子的人,或者

aContributor: someone who can write and manage their own posts but cannot publish them.

贡献者:可以撰写和管理自己的帖子但不能发布的人。

None of these roles can configure WordPress or install plugins.

这些角色均无法配置WordPress或安装插件。

To create new users, click theUsersoption in the menu followed byAdd New. Enter the user’s credentials remembering to set strong user names and passwords.

要创建新用户,请单击菜单中的“用户”选项,然后单击“添加新项”。 输入用户的凭证,记住要设置强用户名和密码。

步骤8:开始写作! (Step 8: Start Writing!)

A default WordPress installation offers two types of content:

默认的WordPress安装提供两种类型的内容:

Posts: articles and blog posts normally displayed in reverse chronological order. Posts can be assigned to categories, tags, and may have alternative formats such as galleries and videos.

帖子:文章和博客帖子通常按相反的时间顺序显示。 帖子可以分配给类别,标签,并且可以具有其他格式,例如画廊和视频。

Pages: static website pages normally displayed in a menu hierarchy –home,about us,contact us, etc. A page can be assigned a parent page and an order to ensure menus are created correctly.

页面:通常以菜单层次结构显示的静态网站页面-主页,关于我们,与我们联系等。可以为页面分配父页面和命令以确保菜单正确创建。

Both content types are accessed from the menu and look very similar. Double-check you are editing the correct content. You are likely to find default pages, posts and comments for the initial site — remember to delete them!(Deleted items are sent to the Trash and can be retrieved if necessary).

两种内容类型都可以从菜单中访问,并且看起来非常相似。 仔细检查您正在编辑正确的内容。 您可能会找到初始站点的默认页面,帖子和评论-请记住将其删除!(已删除的项目将发送到垃圾箱,必要时可以检索)。

At this point, I hope you have the final copy for all the content planned in step 2. No one ever does, but it’s worth adding as many pages as possible. This will allow you to see how menus and article lists are forming before making decisions about layout and themes.

此时,我希望您拥有步骤2中计划的所有内容的最终副本。没有人可以这样做,但是值得添加尽可能多的页面。 这将使您在决定布局和主题之前,先查看菜单和文章列表的形成方式。

WordPress编辑器 (The WordPress Editor)

WordPress provides a visual and text/code editor. Most users will prefer the visual editor because it allows them to enter and format text much as they would in a word processor. WordPress generally does a good job but:

WordPress提供了视觉和文本/代码编辑器。 大多数用户会喜欢可视化编辑器,因为它使他们可以像在文字处理器中一样输入和格式化文本。 WordPress通常做得很好,但是:

The visual editor can become difficult for more complex layouts. Inevitably, users will demand features such as tables or columns which may be difficult to edit or are not directly supported in the site’s theme.对于更复杂的布局,视觉编辑器可能会变得困难。 不可避免地,用户将需要诸如表或列之类的功能,这些功能可能难以编辑或站点主题未直接支持。 The HTML code can become messy when users have unrestricted control to change fonts, colors, and formatting.当用户不受限制地更改字体,颜色和格式时,HTML代码可能变得混乱。

Ideally, use the text editor or consider options such as markdown (which may require a plugin):

理想情况下,使用文本编辑器或考虑诸如markdown(可能需要插件)之类的选项:

How Writers & Bloggers Can Make the Most of Markdown in WordPress

作家和博客作者如何充分利用WordPress的Markdown

The Best Markdown Plugins for WordPress

WordPress的最佳Markdown插件

步骤9:立即备份! (Step 9: Back-up Now!)

If you’ve gotten this far, you now have a working WordPress installation with several pages of content. How long did it take? Several hours? A few days? Now consider how painful it would be to lose everything.

如果到此为止,您现在将可以正常工作的WordPress安装有几页内容。 它花了多少时间? 几个小时? 几天? 现在考虑失去所有一切将是多么痛苦。

Disks fail. Databases corrupt. Users make mistakes. Sites are hacked. A rogue plugin could cause havoc. Hosts go out of business. There are any number of reasons why your carefully-created site could disappear.

磁盘故障。 数据库损坏。 用户会犯错误。 网站被黑客入侵。 流氓插件可能会造成破坏。 主机倒闭。 精心创建的网站可能会出于多种原因消失。

Hosts such as SiteGround provide a free daily back-up. At the very least, ensure you back-up all content before proceeding to the next step. There are a couple of simple options:

诸如SiteGround之类的主机提供免费的每日备份 。 至少,在继续下一步之前,请确保备份所有内容。 有两个简单的选项:

WordPress’sTools>Exportfacility allows you to download all content as a single XML file.

WordPress的工具>导出工具允许您将所有内容下载为单个XML文件。

cPanel provides aCreate Backupoption. From here you can download a full website backup, just the files or just the database.

cPanel提供了“创建备份”选项。 您可以从此处下载完整的网站备份,只需下载文件或数据库即可。

Backing up all WordPress files is rarely required unless you have complex custom code or configurations. However, the database contains all the content and settings —ensure you download a copy.

除非您具有复杂的自定义代码或配置,否则很少需要备份所有WordPress文件。 但是,数据库包含所有内容和设置-确保下载副本。

Longer term, ensure you have a robust, automated back-up solution in place:

从长远来看,请确保您拥有一个强大的,自动化的备份解决方案:

How to Backup Your WordPress System

如何备份您的WordPress系统

5 WordPress Plugins for Backups and Migrations

5个用于备份和迁移的WordPress插件

步骤10:安全性,安全性,安全性 (Step 10: Security, Security, Security)

Unfortunately, WordPress’s success has made it a target. If you can gain access to one site, you may be able to gain access to a third of the sites on the web.

不幸的是,WordPress的成功使它成为了目标。 如果您可以访问一个站点,则可以访问网络上三分之一的站点。

Never underestimate your vulnerability. Your small blog is attractive because, unlike larger companies, you are less likely to have the knowledge or resources to thwart attacks. Some will attack you for the challenge or to cause malicious damage. However, the worst culprits sneak links into your content, place phishing sites deep within your folder structure, or use your server to send spam. Once your installation is cracked, it may be necessary to delete everything and reinstall from scratch.

永远不要低估您的漏洞。 您的小型博客很有吸引力,因为与大型公司不同,您不太可能拥有阻止攻击的知识或资源。 有些会挑战您或造成恶意破坏攻击您。 但是,最严重的罪魁祸首是将链接潜入您的内容,将钓鱼网站放置在文件夹结构中,或者使用服务器发送垃圾邮件。 安装破解后,可能有必要删除所有内容并从头开始重新安装。

There are many technical options but being aware of the risks is most important. Never trust your users. Never trust third-party themes and plugins. Never avoid implementing a back-up plan!

有许多技术选择,但要意识到风险是最重要的。 永远不要信任您的用户。 永远不要相信第三方主题和插件。 永远不要避免执行备份计划!

WordPress Security

WordPress安全

10 Easy WordPress Security Tips

10个简单的WordPress安全提示

步骤11:安装主题 (Step 11: Install a Theme)

One reason for WordPress’s meteoric rise in popularity was the simplicity of theme development. It quickly gained thousands of free and commercial themes. Many are amazing. Many are an awful bloated mess.

WordPressSwift普及的原因之一是主题开发的简单性。 它很快获得了数千个免费和商业主题。 许多很棒。 许多都是可怕的肿的混乱。

It’s tempting to install a theme immediately but this can be a mistake. You can only appreciate whether a theme is suitable once you have appropriate content to view. Afreetheme can rapidly become expensive if you need to pay for custom development to make your menu fit or have mobile layout problems fixed. In addition, it’s best to back-up your site before installing a theme which runs third-party code.

立即安装主题很诱人,但这可能是一个错误。 仅当您有适当的内容要查看时,您才能欣赏主题是否合适。 如果您需要付费进行定制开发以使菜单适合或已解决移动布局问题,则免费主题可能很快变得昂贵。 此外,最好在安装运行第三方代码的主题之前备份您的网站。

Themes are installed and managed from the WordPressAppearancemenu available to administrators. ClickAdd Newto browse and search hundreds of themes on the theme directory. Any theme can be previewed, installed and activated using the buttons which appear when hovering over a theme.

主题是从管理员可用的WordPress外观菜单中安装和管理的。 单击“添加新项”以浏览并搜索主题目录上的数百个主题 。 悬停在主题上时,可以使用出现的按钮预览,安装和激活任何主题。

There are dozens of other sites offering free and commercial WordPress themes. These can be uploaded in a ZIP file by clicking theUpload Themebutton.

还有许多其他站点提供免费和商业WordPress主题。 可以通过单击“上载主题”按钮将它们上载到ZIP文件中。

WordPress themes

WordPress主题

Beginner’s Guide to SitePoint Base Theme for WordPress

WordPress的SitePoint基本主题新手指南

10 Features to Look for in a Premium WordPress Theme

优质WordPress主题中要寻找的10个功能

步骤12:安装插件 (Step 12: Install Plugins)

Similarly, WordPress has a thriving plugin ecosystem offering a diverse array of additional functionality. You can transform WordPress into a social network, online shop, or CRM system.Whether you should is another matter…

同样,WordPress具有蓬勃发展的插件生态系统,可提供各种附加功能。 您可以将WordPress转换为社交网络,在线商店或CRM系统。是否应该另当别论...

It’s tempting to install a range of plugins for every potential use-case but:

为每个潜在用例安装一系列插件很诱人,但是:

plugins run third-party code. The majority are fine but there’s no guarantee every one will be secure or compatible with your installation.插件运行第三方代码。 大多数都很好,但不能保证每个人都将安全或与您的安装兼容。 will your critical plugin continue to receive updates and support?您的重要插件会继续获得更新和支持吗? every installation incurs a performance hit. Misbehaving plugins can cause misery for WordPress editors.每次安装都会导致性能下降。 插件使用不当可能会给WordPress编辑器带来麻烦。

Only install a plugin when it’s absolutely necessary. There are a few essentials many people choose to install:

仅在绝对必要时安装插件。 许多人选择安装一些必需品:

A caching plugin such as WP Super Cache or W3 Total Cache can noticeably improve WordPress performance. Hosts such as SiteGround provide their own caching solutions.

诸如WP Super Cache或W3 Total Cache之类的缓存插件可以显着提高WordPress性能。 诸如SiteGround的主机提供了自己的缓存解决方案 。

If you’re using comments, a spam checker such as Akismet is so essential, it’s provided with most new installations. You just need to enable it.

如果您使用注释,则诸如Akismet之类的垃圾邮件检查器非常重要,大多数新安装都提供了该检查器。 您只需要启用它。

JetPack provides a number of free and commercial options to improve analytics, SEO, security, CDNs, embedded media and support.

JetPack提供了许多免费和商业选项,以改善分析,SEO,安全性,CDN,嵌入式媒体和支持。

Yoast SEO can help improve content, readability and search engine indexing.

Yoast SEO可以帮助改善内容,可读性和搜索引擎索引。

To install plugins, log in as an administrator then selectAdd Newfrom the WordPressPluginsmenu. You can browse, install and activate plugins using the appropriate buttons. Remember to check the details, version compatibility and reviews before committing to an installation.

要安装插件,请以管理员身份登录,然后从WordPress插件菜单中选择“添加新内容”。 您可以使用适当的按钮浏览,安装和激活插件。 在进行安装之前,切记要检查详细信息,版本兼容性和评论。

You should now have a working WorkPress installation with several pages of content. Many people are happy to stop at this point, but you can evolve further…

现在,您应该具有包含几页内容的WorkPress安装。 许多人乐于此刻停止,但是您可以进一步发展…

奖励步骤13:您自己的开发系统 (Bonus Step 13: Your Own Development System)

Until this point, you have been working on a single, live WordPress installation. This process rapidly becomes impractical as you test themes, plugins and your own code. A single rogue command could break your entire system; both the site and administration panel could come crashing down.

到目前为止,您一直在进行单个实时WordPress安装。 当您测试主题,插件和您自己的代码时,此过程很快变得不切实际。 一个流氓命令可能会破坏您的整个系统。 网站和管理面板都可能崩溃。

A better option is a test code running on your own local PC before you deploy it to the live server. At a minimum, you will need to install:

更好的选择是在将其部署到实时服务器之前,在自己的本地PC上运行测试代码。 至少,您将需要安装:

Web server software such as Apache or NGINX.

Web服务器软件,例如Apache或NGINX 。

The PHP language runtime with MySQL and other appropriate extensions enabled.

启用了MySQL和其他适当扩展的PHP语言运行时 。

The MySQL database server.

MySQL数据库服务器。

A local installation of WordPress.

WordPress的本地安装。

A copy of the themes and plugins installed on your live server.实时服务器上安装的主题和插件的副本。 Ideally, a snapshot of the current content would be useful.理想情况下,当前内容的快照将很有用。

Fortunately, there are some simpler single-installers which do the hard work for you including MAMP, WampServer, and XAMPP.

幸运的是,有一些更简单的单一安装程序为您完成了艰苦的工作,包括MAMP , WampServer和XAMPP 。

A better option could be an isolated virtual machine which runs Linux and all dependencies “within” your PC. This will be closer to your hosting environment which avoids cross-platform development issues. Popular options include Docker and Vagrant — both offer pre-configured WordPress systems.

更好的选择是隔离的虚拟机,该虚拟机运行Linux以及PC内的所有依赖项。 这将更接近您的托管环境,从而避免了跨平台开发问题。 流行的选项包括Docker和Vagrant-两者均提供预配置的WordPress系统。

Other considerations include:

其他注意事项包括:

WP-CLI – a command line interface for WordPress which allows you to install updates and plugins.

WP-CLI – WordPress的命令行界面,可让您安装更新和插件。

VersionPress – a version control plugin for WordPress built on Git.

VersionPress –基于Git构建的WordPress版本控制插件。

Host-specific options. For example, SiteGround provide Git repository management and a staging environment which creates a snapshot of your WordPress installation you can update and push live.

主机特定的选项。 例如,SiteGround提供了Git存储库管理和一个临时环境 ,该环境为您的WordPress安装创建快照,您可以对其进行更新和实时发布。

Finally, you will require a number of other development tools and utilities including:

最后,您将需要许多其他开发工具和实用程序,包括:

A code editor or IDE such as VScode or Atom.

代码编辑器或IDE,例如VScode或Atom 。

MySQL management clients such as Adminer or phpMyAdmin.

MySQL管理客户端,例如Adminer或phpMyAdmin 。

Graphic manipulation software.图形处理软件。

Git for source control.

用于源代码控制的Git 。

There is an infinite variety of ways to build a local environment and you may need to consider concurrent revisions by two or more developers. Start with a simple working system then evolve and improve your workflow over time.

建立本地环境的方式有很多种,您可能需要考虑由两个或多个开发人员进行的并发修订。 从一个简单的工作系统开始,然后逐步发展并改善您的工作流程。

The Ultimate WordPress Development Environment

终极WordPress开发环境

Develop WordPress Themes Faster with Gulp

用Gulp更快地开发WordPress主题

奖励步骤14:开发自己的WordPress主题 (Bonus Step 14: Develop Your Own WordPress Themes)

Why should your site look like 101 others? Consider developing your own WordPress theme. You’ll require some HTML, CSS and PHP knowledge but a custom theme offers more flexibility and better performance than any off-the-shelf option.

为什么您的网站看起来像其他101个网站? 考虑开发自己的WordPress主题 。 您将需要一些HTML,CSS和PHP知识,但是自定义主题比任何现成的选项都具有更大的灵活性和更好的性能。

There are two potential approaches:

有两种可能的方法:

Adapt a barebones theme. Options such as HTML5 Blank, Underscores, BlankSlate and Bones provide simple themes with minimalistic styling.

调整准系统主题。 如选择HTML5空白 , 下划线 , BlankSlate和骨骼提供简约的造型简单的主题。

Start from scratch. Create the minimum number of files (style.cssandindex.php) then evolve from there.

白手起家。 创建最少数量的文件(style.cssindex.php),然后从那里进行扩展。

You could use a combination of the two, i.e. copy code snippets from a working theme into your own files.

您可以将两者结合使用,即将代码片段从工作主题复制到自己的文件中。

WordPress theme development is reassuringly easy and fun for anyone with the appropriate development knowledge. That said, it could be a frustrating experience for novice coders. There are simpler options to learn coding — such as SitePoint courses, books and videos.

拥有适当开发知识的任何人都可以轻松而有趣地进行WordPress主题开发。 也就是说,对于新手程序员而言,这可能是令人沮丧的经历。 有更简单的方法来学习编码-例如SitePoint课程,书籍和视频 。

WordPress Theme Development

WordPress主题开发

How to Improve the Performance of Your WordPress Theme

如何提高WordPress主题的性能

How to Optimize WordPress for Better Performance

如何优化WordPress以获得更好的性能

奖励步骤15:开发自己的WordPress插件 (Bonus Step 15: Develop Your Own WordPress Plugins)

Your theme’sfunctions.phpfile can contain PHP code which enhances WordPress functionality. For example, see 7 Ways to Make WordPress Simpler for Users. However, the file can become impractical for larger developments or functionality you want to use on another site.

您主题的functions.php文件可以包含增强WordPress功能PHP代码。 例如,请参阅使用户简化WordPress的7种方法 。 但是,对于要在其他站点上使用的较大的开发或功能,该文件可能变得不切实际。

The answer:develop your own plugins. Again, WordPress makes development remarkably easy presuming you know a little PHP. Start with a simple example such as How to Customize the WordPress ToolBar then build your own plugins as you expand your knowledge.

答案:开发自己的插件。 再次,假设您已经了解一点PHP,WordPress将使开发变得非常容易。 从一个简单的示例开始,例如如何自定义WordPress工具栏,然后在扩展知识的同时构建自己的插件。

Writing a Plugin

编写插件

WordPress Plugin Development for Beginners

WordPress初学者开发

An Introduction to WordPress Plugin Development

WordPress插件开发简介

A Real World Example of WordPress Plugin Development

WordPress插件开发的真实示例

和放松! (And Relax!)

Congratulations for getting this far. You now have enough knowledge to install, configure, and enhance any WordPress system. Your skills have just become invaluable to one in three online companies who choose to deploy WordPress. Best of luck!

恭喜! 您现在已经拥有足够的知识来安装,配置和增强任何WordPress系统。 对于选择部署WordPress的三分之一在线公司来说,您的技能变得非常宝贵。 祝你好运!

翻译自: /the-ultimate-beginners-guide-to-setting-up-running-a-wordpress-site/

wordpress入门主题

如果觉得《wordpress入门主题_设置和运行WordPress网站的终极入门指南》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。