如何製作WordPress網站:面向初學者和高級用戶的終極指南

許多人想知道如何製作WordPress網站。 ?

他們已經聽說過WordPress,WordPress令人難以置信的受歡迎程度,出色的功能和設計,現在他們希望加入其中,並建立自己的WordPress網站。 ?

那麼,從哪裡開始呢?無論您使用該平台有多先進,我們都會在這裡為您量身定製資源。

接下來是如何製作WordPress網站的自選冒險指南。

如何製作一個WordPress網站

從以下方案中進行選擇,然後查看指南為您提供的功能:

初學者
?我是第一個網站上的初學者

中間
I️我知道製作WordPress網站的基礎知識,但我想加快這一過程

高級
‘我是開發人員/高級用戶,想改善我的工作流程,製作多個WordPress網站

☝️☝️☝️

什麼是WordPress,為什麼要使用它?

首先,讓我先說服您,並告訴您為什麼在構建您的網站時使用WordPress確實是正確的決定。

我想花點時間做這件事,因為儘管有無可否認的WordPress優勢證據,但仍有人會告訴您WordPress對於某些類型的網站還不夠好。

幸運的是,我們可以使用實際數據來完成此處的大部分討論:

首先,WordPress是什麼?

簡而言之,WordPress是您網站的操作系統。

您的iPhone運行iOS,三星銀河運行Android,您的網站可以選擇運行WordPress。

在此處了解有關WordPress的更多信息

就是說,WordPress不是唯一可用的網站操作系統。但是,它是最受歡迎的一種。

WordPress運行著35%的網站。是的,您正在閱讀的就是所有網站。

同樣,這些網站中有許多都不是您所謂的簡單博客網站。與諸如AMC,Mercedes,BBC,Walt Disney等品牌一樣,許多其他公司也將WordPress視為其在線業務的操作系統。使用WordPress也可能沒​​事!

下一步,WordPress具有極強的功能可作為您的在線(eCommerce)商店的操作系統。所有在線商店中近30%都使用WordPress。

然後,還有可定製性的話題。

  • 從設計開始,您會發現WordPress提供了最多的可安裝設計包(主題)選擇,只需單擊幾下即可將其導入網站。
  • 您還可以通過插件大量擴展網站功能。就像主題一樣,它們也只需點擊幾下即可安裝。

另外,如果您需要有關WordPress技術方面的幫助,您會發現圍繞WordPress的社區眾多。大多數時候,您可以免費獲得幫助。

最重要的是,託管WordPress網站也非常容易,而且最重要的是便宜。 ((稍後我們將討論網路託管。)

所有這些使WordPress成為所有網站中功能最廣泛的操作系統。最後,通過使用WordPress,您將獲得:

驕傲的編碼員

頂級品牌使用的平台+巨大的知名度+強大的社區+可安裝的設計包+插件+廉價的託管+多功能=很棒的網站!

在接下來的步驟中,我將向您展示如何逐步創建WordPress網站:

選擇域名和託管

作為WordPress世界的新用戶,您基本上必須在冒險一開始就應對該過程中最令人生畏和令人困惑的步驟。

令人困惑的是您開始製作WordPress網站的地方。起點不是WordPress本身。實際的出發點是獲取域名和虛擬主機。

只是為了確保我們在同一頁面上:

  • 域名是您網站在網路上的地址。例如,此站點的域是codeinwp.com。
  • 虛擬主機是保存您的網站的伺服器。人們普遍認為「網站生活在互聯網上」是一種誤解。它們實際生活的地方在由網路託管公司管理的網路伺服器上。在後台,網路伺服器只是經過優化以處理網站的一種計算機。

對於域名和託管而言,令人恐懼的是,目前尚不清楚從何處著手。

我建議您這樣做:

首先,為您的網站選擇一個名稱。 ?

您可能已經有了一些想法,但是您也可以使用一些網路上可用的名稱生成工具。

如何製作WordPress網站:首先,從DomainWheel獲得域名建議

我喜歡DomainWheel,因為它是我們自己的工具,此外,我們付出了很多努力來使其儘可能發揮作用。

首先輸入您的名稱想法,甚至輸入一些您想用來創建網站名稱的種子詞,然後查看DomainWheel對此有何評論。

在DomainWheel的建議中,您可能會找到一些有趣的選項。該工具還會告訴您哪些域名可以註冊。

找到喜歡的域名後,只需將其寫下來即可,以後再購買。

接下來,您將選擇一個託管公司並註冊一個託管帳戶。 ?️

我們在此站點上提供了大量內容,包括各種託管服務,比較,評論以及有關如何選擇理想的虛擬主機的一般建議。我強烈建議您閱讀其中一些內容。

  • 經過比較和測試的2020年最佳WordPress託管提供商
  • 最便宜的WordPress託管:10個選項,每月$ 3.95以下
  • WordPress託管調查:實際用戶對託管的看法如何,6,500多個受訪者認為最佳

伺服器

也就是說,如果您現在沒有時間使用這些資源,那麼在託管方面,這是我的兩個主要建議:

hostBluehost⭐SiteGround

藍主機

藍主機

這是WordPress團隊自己官方推薦的為數不多的公司之一。

Bluehost也是那裡最便宜的主機之一。該計劃從每月2.95美元起。以這個價格,您還將獲得第一年的免費域名。這意味著您甚至不必花更多的錢就能得到理想的域名。

Bluehost不會跟蹤您的帶寬使用情況(您的網站收到的流量),您會獲得50 GB的磁碟空間。

前往Bluehost

SiteGround

SiteGround

SiteGround是WordPress團隊推薦的第二家公司。

SiteGround價格稍貴,每月$ 3.95起。他們也不免費為您提供域名。但是,根據眾多用戶的評論,可以說,您所獲得的是最佳的企業客戶服務和更好的性能。

前往SiteGround

這個選擇由你。大多數用戶通常會對這兩個託管公司感到滿意。

與您選擇的網路託管公司註冊

與網路託管公司註冊並註冊域名是製作WordPress網站的第一步。

如果您對要使用的確切域不是100%肯定,請查看DomainWheel以獲得一些建議。

在託管方面,由於它們易於使用且功能強大的平台,並且伺服器參數與價格的比率也很高,因此我們通常建議您推薦SiteGround和Bluehost。

如果您不確定要選擇哪個,請考慮以下事項:

  • 如果您的預算有限,請使用Bluehost。您不僅可以以每月2.95美元的價格獲得託管服務,還可以在第一年捆綁使用一個免費域名。
  • 如果您更重視伺服器性能和客戶服務,請使用SiteGround –每月$ 3.95起。

在這一步中,我將向您展示如何使用任一主機設置WordPress:

Bluehost入門

轉到Bluehost並單擊「入門」按鈕。選擇一種可用的計劃-最有可能的最便宜的一種,稱為Basic-$ 2.95 /月。

如何在Bluehost Basic上製作WordPress網站

接下來,輸入要為您的網站註冊的域名。

bluehost註冊

下一步是有關提供一些個人信息以完成設置的步驟。

最後,您還必須輸入付款明細。要獲得每月2.95美元的低價,您需要提前三年付款。選擇較短的時間將增加每月的價格。

SiteGround入門

轉到SiteGround,然後在您感興趣的特定託管層下單擊「獲取計劃」按鈕。選擇最便宜的選項StartUp(每月3.95美元)就足以滿足大多數網站的需求。

如何在SiteGround啟動上創建WordPress網站

在下一步中,SiteGround允許您通過其系統註冊域名。在框中輸入所需的域名,然後單擊繼續。

SiteGround域

接下來,您必須提供個人詳細信息,並選擇網路伺服器的基本參數。

請特別注意註冊表的這一部分:

SiteGround購買信息

在這裡,您可以選擇伺服器的數據中心位置以及託管計劃的註冊期限:

  • 選擇最接近目標受眾的數據中心位置-最好在同一國家/地區。
  • 選擇您可以負擔的最長期限。初始期後的續簽價格將會增加,因此從長遠來看,選擇儘可能長的合同作為初始合同會節省您的錢。

完成表格並完成付款。

在您的虛擬主機上安裝WordPress

是否選擇了虛擬主機並創建了帳戶?好!現在讓我們在其之上安裝WordPress。

有兩種處理該過程的好方法。選擇最適合您的選項:

在Bluehost上安裝WordPress

首次登錄Bluehost時,將顯示一個設置嚮導,它將引導您完成WordPress的安裝過程。

如果您錯過了該嚮導或無意中將其禁用,則始終可以通過轉到「我的網站」,然後單擊「創建網站」按鈕來安裝新的WordPress網站。

如何製作WordPress網站:Bluehost註冊

其餘的安裝過程不需要任何技術知識。您只需填寫一個表格,然後讓Bluehost知道您要如何設置您的管理員帳戶。

在SiteGround上安裝WordPress

儘管這些情況有時會隨著SiteGround的變化而改變,但通常來說,完成帳戶設置後,您應該已經在運行WordPress實例。

要檢查是否存在這種情況,請登錄到用戶面板並轉到「我的帳戶」,然後進入「安裝」選項卡。您應該會在此處看到您的網站,以及旁邊的轉到管理面板按鈕。您可以單擊它以進入WordPress儀錶板。

另外,SiteGround可能會向您顯示一個站點設置嚮導,並逐步指導您完成所有操作。在此過程中,您將為網站設置管理員帳戶。安裝完成後,您將能夠登錄WordPress儀錶板。

SiteGround嚮導退出

如果沒有為您設置WordPress網站,最簡單的方法就是通過實時聊天與他們的支持團隊聯繫,並要求他們為您設置WordPress。

他們會很樂意這樣做,而且您也避免了在途中發生任何錯誤的可能性。

SiteGround幫助

通過WP-CLI安裝WordPress

手動安裝WordPress很好,但是我們可以聘請我們的老朋友WP-CLI來簡化事情。

Bon️紅利:在頁面底部,您將找到本指南中使用的所有WP-CLI命令的摘要。您可以複製並粘貼到記錄中的內容。

  • 如果您不知道,WP-CLI是WordPress的命令行界面。它在標準Unix命令行中已經提供的功能之上添加了一系列WordPress命令。

通過WP-CLI安裝WordPress有兩個優點:

  • 您可以製作自己獨特的命令序列,然後多次重複使用以啟動新站點。
  • 這個過程也要快得多-不僅不會因WordPress UI速度變慢,而且shell命令到達目標位置並執行所需的時間也更少。

Note️注意;下面介紹的步驟從與主機建立SSH連接開始。

首先,請確保您的伺服器上確實安裝了WP-CLI。運行以下命令:

wp –info

您應該看到WP-CLI狀態屏幕。

?注意;在我們推薦的WordPress,SiteGround,A2 Hosting和WP Engine的頂級Web託管選項中,默認情況下均安裝了WP-CLI。

如果沒有安裝WP-CLI,您仍然可以將其自己添加到大多數伺服器中。這樣做的方法。

要通過WP-CLI安裝WordPress,請先轉到您要安裝站點的目錄路徑。下一個:

wp core下載

  • 下載WordPress

wp config create –dbname = YOUR_DATABASE_NAME –dbuser = YOUR_DATABASE_USER –prompt = YOUR_P4SS

  • 創建一個新的wp-config.php文件

wp db創建

  • 根據上一條命令設置的詳細信息創建資料庫

wp核心安裝–url = YOUR_DOMAIN.com –title =「站點標題」 –admin_user = ADMIN_USER –admin_password = ADMIN_P4SS –admin_email=YOUR@EMAIL.com

這就對了!一旦掌握了整個過程,整個過程只需幾秒鐘。建立SSH連接可能是最長的部分。

通過cPanel在任何主機上安裝WordPress

大多數網路託管公司使用名為cPanel的工具來讓用戶管理其託管設置。簡單來說,cPanel是一個在線管理面板,使您能夠配置Web伺服器,添加新帳戶,資料庫,電子郵件以及諸如WordPress之類的網站腳本。

在大多數版本的cPanel中,都有一個名為Softaculous的腳本安裝工具。您可以在「軟體」部分中找到它。

如何通過Softaculous製作WordPress網站

單擊它後,您將很快意識到Softaculous提供了多少功能以及可以為您安裝多少個不同的網站腳本。幸運的是,WordPress在列表的頂部。單擊WordPress徽標開始。

WordPress軟

單擊立即安裝以開始安裝。

Softaculous將為您顯示一個表格,您必須在其中輸入網站的所有詳細信息。即使表單較大,也容易掌握欄位。

這是表格中最重要的部分:

重要形式

您可以在此處選擇站點的域名(默認情況下,您可能已經在其中選擇了正確的域名;如果沒有,請調整選擇),還輸入站點的標題和管理員帳戶的詳細信息。

單擊安裝後,將開始安裝過程。幾分鐘後,您會收到通知。

在此階段,您將能夠登錄WordPress儀錶板。

重用空白的WordPress模板網站

如果您經常在新的WordPress網站上工作,那麼您會發現自己多次安裝WordPress網站的相同結構。

我們都有我們最喜歡的插件,主題,我們最喜歡的網站設置等。每次手動排列它們都是很浪費時間。

有兩種很棒的方法可以使自己始終保持相同的WordPress安裝:

  • 在每個新站點上使用一系列WP-CLI命令
  • 創建一個獨立的網站模板,然後使用第三方工具將其導入每個新網站

如果您想使事情保持相對簡單,請確保已安裝所有您喜歡的插件,一個主題以及一些基本的WordPress設置,那麼WP-CLI路徑就可以了。

要進行更高級的設置-涉及預配置複雜的插件或導入整個首頁設計,則需要走另一條路,並使用一些第三方工具。

使用WP-CLI啟動模板WordPress網站

就像我們安裝WordPress一樣,使用WP-CLI也是配置新站點的最有效,最快的方法。

以下是一些您可以使用的基本命令:

wp插件刪除你好

  • 擺脫了hello插件

wp主題安裝THEME_SLUG
wp主題激活THEME_SLUG

  • 安裝並激活主題

wp插件安裝PLUGIN_SLUG
wp插件激活PLUGIN_SLUG

  • 安裝並激活插件

wp評論刪除$(wp評論列表–format = ids)
wp post delete $(wp post list –post_type =’post’–format = ids)
wp post delete $(wp post list –post_type =’page’–format = ids)

  • 刪除在安裝過程中創建的所有評論,帖子和頁面

或者:

wp網站為空

  • 整個網站一片空白;不會留下任何帖子,評論,術語或元

wp網站為空–uploads

  • 從上載目錄中刪除所有內容

wp post generate –count = 10

  • 創建十個空帖進行測試

即使您只想擺脫虛擬內容並安裝幾個插件,也可以通過WP-CLI更快地完成。

您可以自行創建理想的WP-CLI命令序列,以獲取所需的確切插件,主題和入門站點內容。這是可供選擇的WP-CLI命令的完整目錄。

使用Duplicator啟動模板WordPress網站

處理模板網站的一種好方法是使用Duplicator之類的插件。

複製器– WordPress遷移插件複製器– WordPress遷移插件

作者:Snap Creek

當前版本:1.3.28

上次更新時間:2020年2月12日

duplicator.1.3.28.zip

98%評級

1,000,000+安裝

WP 4.0+要求

如果您一開始就需要更全面的插件集(或主題),並且希望這些插件已經以某種方式進行了預配置,則此路徑更適合。

例如,許多開發人員喜歡從他們喜歡的主題,特定的入門網站和特定的頁面構建器插件開始,這些插件已經導入了一些常見的頁面設計(例如「關於」頁面,「聯繫人」頁面等)。您可以建立這種模板網站,然後使用Duplicator進行推廣。

偶爾,您也可以更新該模板站點,從而最大程度地減少了以後更新所有內容的需要。

它的工作原理與您期望的完全一樣:

  1. 首先在測試伺服器上設置模板站點。
  2. 請注意您喜歡的基本站點設置。這涉及永久鏈接,搜索引擎可見性,評論和pingback / trackback設置。
  3. 安裝您認為必須的插件。不要在這裡太過分,實際上只能在所有網站上安裝您始終需要的插件。通常屬於此類別的是備份插件,安全性,SEO,社交媒體,ACF,聯繫表,性能插件,Google Analytics(分析)。
  4. 安裝您喜歡的主題–但前提是您必須在所有站點上都使用它。
  5. 預先配置插件和主題。
  6. 分配必需的小部件(如果有)。
  7. 將一些虛擬內容導入博客文章。
  8. 創建必備頁面。關於,聯繫之類的事情。
  9. 創建一個主導航菜單。

list「 width =」 1081「 height =」 898「 class =」 aligncenter size-full wp-image-61452

完成所有步驟後,安裝Duplicator並完成將站點導出為模板的過程。

我們在此處提供了有關如何執行此操作的指南。該指南還介紹了如何拍攝站點圖像並將其部署到新位置。

了解WordPress界面

WordPress的每個新用戶都必須熟悉的第一件事是WordPress界面本身。

一旦您學會了繩索,UI確實變得非常易於使用,但是對於人們來說,這並不是最簡單的事情。

要登錄WordPress儀錶板,請訪問www.YOURDOMAIN.com/wp-admin/

輸入在WordPress主機上設置過程中設置的用戶名和密碼。

成功登錄後,您將看到WordPress主界面:

如何製作WordPress網站:WordPress儀錶盤「 width =」 2864「 height =」 1434「 class =」 aligncenter blog-img-std-space size-full wp-image-61386

以下是最重要的部分:

  • (1)歡迎留言。在這裡,您會找到一些指向管理面板各個關鍵區域的快捷鏈接。

  • (2)您網站的當前狀態及其進展。

  • (3)帖子。您可以在此處創建博客文章。

  • (4)媒體。您站點的媒體庫–在這裡您可以上傳和管理圖像以及其他媒體文件。

  • (5)頁。您可以在這裡創建頁面。

  • (6)評論。您會在此處找到所有讀者的評論。

  • (7)外觀。在這裡,您可以更改當前主題並自定義網站的其他設計功能。

  • (8)插件。在此處安裝新插件。

  • (9)用戶。管理有權訪問該站點的用戶帳戶。

  • (10)設置。該站點的主設置面板。

建議您在這裡花點時間,逐節查看可用的內容。讓自己熟悉。

下一個:

照顧一些基本的網站設置

儘管WordPress可以在其默認預設上完美運行,但是在完成一些基本優化後,您將獲得更多收益:

設置固定鏈接

固定鏈接定義WordPress如何構建網站上各個子頁面的網址(稱為URL)。

長話短說,您想在URL中添加頁面標題。默認設置無法滿足您的要求,因此我們需要對其進行調整。

從信息中心的主側欄中轉到設置→永久鏈接。

選擇以下設置:

帖子名稱「 width =」 1390「 height =」 610「 class =」 aligncenter blog-img-std-space size-full wp-image-61375

單擊保存更改。

使您的網站對Google可見

通常,默認情況下,大多數WordPress網站都設置為對Google可見,但是我們將檢查您的網站是否是這種情況–請確保!

轉到設置→閱讀,並確保未選中標記為「不鼓勵搜索引擎……」的框。

如何製作WordPress網站:設置可見性「 width =」 1278「 height =」 180「 class =」 aligncenter blog-img-std-space size-full wp-image-61385

檢查您的網站標題和口號

轉到設置→常規,然後在「網站標題」和「標語」欄位中查看內容。根據需要進行調整。

網站標題和標語經常在您的整個網站的首頁,SEO標題和說明,網站設計的標頭區域等地方使用。

總是設置正確的標題和標語總是很好。

啟用/禁用評論

是否要接受讀者評論完全取決於您。

支持和反對都有很好的論據,因此請隨時做出自己的決定。

要更改網站的評論設置,請轉至設置→討論。這是要調整的欄位:

評論「 width =」 1640「 height =」 284「 class =」 aligncenter blog-img-std-space size-full wp-image-61356

禁用pingback和引用

引用和引用是一天中剩餘的功能。沒有人使用它們了。

要禁用pingback和引用,請轉到「設置」→「討論」,然後取消選中以下框:

pingbacks「 width =」 1640「 height =」 284「 class =」 aligncenter blog-img-std-space size-full wp-image-61373

設置正確的時區

時區設置雖然很小,但是如果設置不正確,則可能會使您的網站混亂。

例如,如果時區錯誤,當您將某些博客文章設置為在上午8點上線時,您可能會感到驚訝,卻發現該帖子在深夜上線,因為您的站點認為它在另一個大陸上。它發生了。

為確保您的時區設置正確,請轉到設置→常規,然後查找以下欄位:

時區「 width =」 1500「 height =」 148「 class =」 aligncenter blog-img-std-space size-full wp-image-61384

所有這些設置都是非常基本的。這部分的總時間不應超過10分鐘。

自動化基本網站設置

設置新站點通常是每次相同的步驟序列。

為什麼不自動化呢?

再次,我們的好朋友WP-CLI來救援!您可以使用一些有用的命令:

設置固定鏈接

wp重寫結構’/%postname%/’

添加用戶帳戶

wp用戶創建john john@example.com –role = author

確保該網站對Google可見

wp選項更新blog_public 1

設置網站的標題和標語

wp選項更新博客名稱「您的站點名稱」
wp選項更新blogdescription「您的網站描述」

啟用/禁用評論

wp選項更新default_comment_status已關閉

要麼:

wp選項更新default_comment_status打開

禁用pingback和引用

wp選項更新default_ping_status已關閉

設置正確的時區

wp選項更新timezone_string「美國/紐約」

can您可以調整的範圍並不止於此。繼續看一下WordPress資料庫中的wp_options表。您可以使用wp選項更新命令來調整任何設置。這是文檔。簽出並創建您自己的WP-CLI命令序列,以自動執行WordPress網站設置。

選擇一個WordPress主題

關於WordPress的最好的事情之一是,您只需單擊幾下就可以更改網站的整個設計。這是藉助WordPress主題完成的。

只是為了向您展示可能,這是一個現有的WordPress網站的外觀:

如何製作WordPress網站:普通網站「 width =」 1200「 height =」 703「 class =」 aligncenter blog-img-std-space size-full wp-image-61387

這是在安裝新主題並花了幾分鐘的時間對其進行自定義後的外觀:

如何製作WordPress網站:美觀的網站「 width =」 1142「 height =」 856「 class =」 aligncenter blog-img-std-space size-full wp-image-61370

最好的消息?

許多WordPress頂級主題都是免費的。

選擇主題並將其安裝到您的網站的方法如下:

轉到外觀→主題,然後單擊添加新。

主題添加新的「 width =」 1968「 height =」 758「 class =」 aligncenter blog-img-std-space size-full wp-image-61383

切換到「流行」選項卡。

標籤流行」 width =「 1098」 height =「 252」 class =「 aligncenter blog-img-std-space size-full wp-image-61382

您正在尋找的是社區最欣賞的主題。他們都是免費的。

瀏覽此列表,然後選擇您喜歡的主題。我將選擇Neve(這是我們姊妹公司製作的主題,也是目錄中最受歡迎的主題之一)。

單擊安裝以將主題導入到您的站點:

如何製作WordPress網站:安裝主題「 width =」 1234「 height =」 1070「 class =」 aligncenter blog-img-std-space size-full wp-image-61363

安裝完成後,將顯示「激活」按鈕。點擊它。

自定義主題

根據您選擇的特定主題,入門和自定義過程可能會有所不同。以下是Neve的工作方式:

在上一步中單擊「激活」按鈕後,Neve會向您顯示一條成功消息,並邀請您通過導入入門網站開始使用主題。

全新的入門網站」 width =「 2442」 height =「 830」 class =「 aligncenter blog-img-std-space size-full wp-image-61368

入門網站是一種現成的網站結構,已預先設計並預先填充了演示內容。使用入門網站可以加快新WordPress網站的設置過程。

單擊藍色的大按鈕(參見上文)開始導入入門站點。您會看到可用設計的列表。

neve模板「 width =」 1800「 height =」 1505「 class =」 aligncenter blog-img-std-space size-full wp-image-61369

選擇您喜歡的設計,單擊它,然後單擊「導入」按鈕。 Neve將讓您選擇要與設計一起導入的元素。您可以將所有功能保持打開狀態以獲得最佳效果。

neve import「 width =」 1372「 height =」 1390「 class =」 aligncenter blog-img-std-space size-full wp-image-61367

導入本身可能需要一兩分鐘。完成後,您將可以查看您的網站:

如何製作WordPress網站:您的新Neve家居設計「 width =」 2070「 height =」 1496「 class =」 aligncenter blog-img-std-space size-full wp-image-61366

通過定製獲得更深入的了解

WordPress中有一個名為「定製程序」的模塊。在自定義網站和設計時,它可以使您獲得很多細節。

要查看可用的內容,請單擊頂部欄中的「自定義」鏈接,或轉到WordPress儀錶板,然後進入「外觀」→「自定義」。

可用選項的確切範圍取決於您使用的主題。通常,您仍然可以調整網站的布局,頁眉和頁腳,顏色和背景,版式,按鈕,菜單等。

neve定製程序設置「 width =」 1444「 height =」 1410「 class =」 aligncenter blog-img-std-space size-full wp-image-61365

瀏覽不同的部分,並查看它們的調整對您的網站的影響–更改在右側的預覽窗格中實時生效。

如果要保留更改,請單擊「發布」按鈕(左上角)。

通過WP-CLI自定義主題

注意;如果您尚未安裝主題,請滾動到上一節,其中介紹了如何使用WP-CLI完成該主題。

現在,以半自動方式自定義主題。

還記得我們在討論您網站的核心設置時使用的wp選項更新命令嗎?您也可以將其用於主題設置。

大多數WordPress主題(如果不是全部)都將其設置存儲在資料庫的wp_options表中。這意味著您可以使用wp option update命令修改這些選項-對其進行預先設置。

不幸的是,無法避免的事情是,您必須通過wp-admin手動進行初始設置和自定義。但是,然後,您可以重複使用這些設置,並在WP-CLI的幫助下將其部署到新站點。

安裝並自定義主題後,使用phpMyAdmin瀏覽wp_options表,然後查找各個選項設置。根據這些設置,創建獨特的wp選項更新命令序列,並逐個重做。在新站點上使用它。

安裝一組必備插件

插件是您的WordPress網站,而應用程序是您的智能手機。 ?

While you can certainly use your smartphone without installing anything extra on it, you would be missing out on a lot of cool functionality. It』s the same story with WordPress plugins. WordPress is functional out-of-the-box, but you can get a lot more out of it with plugins.

We covered our favorite must-have plugins quite in-depth elsewhere on this blog. I encourage you to check that resource out to get detailed descriptions of what each plugin does and why they should make your must-have list as well.

Here』s an excerpt from that resource – just the names of the plugins and a short description of what each does:

plugins

  • Yoast SEO – the most popular SEO plugin for WordPress; it will help your site rank better in Google

  • Google Analytics for WordPress – integrates your website with Google Analytics

  • Cache Enabler – makes your site load quicker; alternatively, check out these caching plugins

  • Wordfence Security – makes your website more secure

  • UpdraftPlus – automatic backups to keep your content safe

  • Optimole – optimizes the images on your site, reduces the amount of disk space they take up, and makes them load faster

  • WPForms – lets you create good-looking contact forms; alternatively, you can try out Contact Form 7

  • Revive Old Post – takes a random blog article from your site and posts it to your social media profiles automatically

  • Not enough? Check out what else is available in the official WordPress Plugin Directory ← you』ll find more than 55,000 plugins there!

This is all cool, but there』s one thing missing:

How to install a WordPress plugin

This is an uncomplicated process. From the WordPress dashboard, go to Plugins and click on Add New:

plugins add new

Either browse through the lists of Featured or Popular plugins, or enter the name of the plugin you want into the search field:

find plugin

When you』ve found your plugin, click on the Install Now button.

Once the plugin gets uploaded to your site, the Activate button will appear. Click on it to finish the installation process.

The plugin has been enabled, and you can start using it.

install plugin

⚠️ Not every plugin works the same once installed. Some require additional configuration while others begin working immediately after activation. You』ll usually find plugin settings under the main Settings panel in the WordPress dashboard.

Install your original set of must-have plugins

While every WordPress website can benefit from an original set of plugins, there are still some plugins that you』ll want on all sites. This usually involves things like SEO, backups, Google Analytics, caching, image optimization, security, contact forms, Jetpack (?), plus a couple more.

You probably already have a pretty good idea as to what your must-have plugins are, so I』m not going to push any individual plugins onto you (maybe just a couple). Instead, let』s focus on what』s the quickest way of having them installed.

Again, no surprise, this method is going to be WP-CLI.

We already covered the main commands to get new plugins installed a couple of sections above. Just to remind you, they are:

wp plugin install PLUGIN_SLUG
wp plugin activate PLUGIN_SLUG

With that done, you can also use WP-CLI to pre-configure plugins. Again, this is done through the wp option update command – the same one we used for configuring your favorite theme.

? At the beginning of this guide, I also mentioned an alternative way to roll out a basic WordPress website with a given collection of presets, themes, plugins, etc. Instead of using WP-CLI and going command by command, you can also use the Duplicator plugin and handle everything in one go. I advise you to test both approaches and see which works better for your workflow.

Some extra plugins to consider making your must-haves

Some of these you already know, some might be new:

Regenerate Thumbnails

Useful when changing themes or working with the site』s default image sizes in any way. As the name suggests, the plugin regenerates all thumbnails to their correct proportions.

Code Snippets

Great plugin for adding custom code blocks to your functions.php file, the stylesheet, or for creating new custom shortcodes.

Just add the snippet through this plugin, enable/disable it as needed, and, most importantly, keep your snippets regardless of any theme or plugin updates you』re making over time.

ACF

Do I even have to advertise this one to you?

Optimole

There are many image optimization plugins in the WordPress directory. Optimole stands out (built by our sister company).

Here are some of the things it does that no other plugins do (or, at least, they don』t offer all these features in the same package):

  • images are optimized in the cloud and then replaced on the front-end on the fly

  • you keep all original versions of your images in the media library
  • picks the right image size based on the visitor』s device and screen size
  • serves all images via CDN
  • uses lazy loading by default
  • makes your images up to 85% smaller with no visible quality loss

Craft a great-looking homepage

Every website needs an awesome-looking homepage. You really don』t want your homepage to feature random info or placeholder text. Getting yourself a custom homepage does a couple of things for you:

  • You get full control over what your first-time website visitors see.
  • You can introduce your business effectively, showcase your top products, and summarize what you』re about.
  • You get to funnel people to the most important areas of your site.

The process of setting up a custom homepage will differ depending on the WordPress theme you』ve chosen.

If you went with our recommended Neve and imported a starter site, then you already have a template homepage waiting to be customized. Here』s how to do that:

When on your homepage, click on the Edit with Elementor button.

How to make a WordPress website: edit with Elementor

This will launch the interface of the Elementor page builder.

  • Elementor is one of the most popular page building plugins for WordPress. Simply speaking, it gives you a visual interface for working on your pages.

Elementor UI

To modify any element, click on it, and then either edit the text or tune up the styling.

element edit

You can also add new elements to the page by clicking on one of the small icons in the top left corner and then picking a new element from the list, like so:

pick element

To add an element to the page, drag-and-drop it into place – exactly where you want it.

The process is straightforward: edit the elements on the page one by one, add your content, upload your images, realign some elements, add new ones, and so on – until you have a homepage that serves the purpose of your website.

Click on the UPDATE button in the bottom left corner when you』re done.

? To learn more about building a homepage for your website or blog, read this.

Create some standard pages

Apart from the homepage, your website also needs a couple of standard pages that will give your visitors the info they need. These pages include:

  • An about page – people who visit your about page have already expressed interest in what your website represents; capitalize on this by introducing yourself and your business, and tell people why they should listen to you.
  • A contact page – this is where you can give people a direct way of contacting you.
  • A services or products page – showcase your offering.
  • A privacy policy page – these days, all websites need a privacy policy page to stay away from trouble and be transparent about what the website does with visitors』 data.

Of course, you don』t have to stop with just these. You can create any number of additional pages.

To create a standard page in WordPress, from the WordPress dashboard, go into Pages and click on the Add New button. You』ll see a simple text editing interface.

How to make a WordPress website: block ui

Enter the title of your page up top and then start typing your page』s content below.

If you want to add images, you can do that by clicking on the 「+」 icon in the top left corner and then selecting the Image block from the list.

add image

Click on the Publish button (top right corner) when you』re done.

Roll out your template pages

Depending on the specific project you』re working on, you might want to roll out a set of template pages that will give you some scaffolding to base your later work on.

We can create those pages in a couple of ways. Fist, our favorite, WP-CLI:

Create template pages in bulk using WP-CLI

「In bulk」 is the keyword here. We』re going to roll out a whole range of example pages in one go.

The command to use is this:

wp post create ./PAGE-CONTENT.txt –post_type=page –post_title=’PAGE FROM FILE’

As you can see, this command takes content from a file and creates a new page based on it.

To use this method of page creation effectively, you can create a range of files for different pages, and then roll them out one by one. For example:

wp post create ./about.txt –post_type=page –post_title=’About’
wp post create ./contact.txt –post_type=page –post_title=’Contact’
wp post create ./privacy.txt –post_type=page –post_title=’Privacy Policy’

Import template pages in bulk

A surprisingly effective method to import template pages is to use WordPress』 native import feature – the one in Tools → Import.

Of course, before you can use it, create your template pages on a fresh WordPress install and then export them from Tools → Export.

? At the beginning of this guide, I also mentioned an alternative way to roll out a basic WordPress website – with the help of the Duplicator plugin. If that』s the path you went with, you』ve probably also included your template pages in the archive.

Add menus / navigation

At this stage, your WordPress website should already be looking quite handsome, which is great, but there are still a couple of things we can do.

Namely, let』s adjust the menus:

From the WordPress dashboard, go to Appearance → Menus. What you』ll see are your theme』s default menu settings.

How to make a WordPress website and set menus

You can customize this easily.

  • To add new menu items, select pages from the section on the left, and click on the Add to Menu button.
  • To realign the menu items, drag and drop them into place.
  • To remove menu items, click into a thing that you want to delete and then click on Remove.
  • To change the location of the menu, adjust the presets in the Display location section at the bottom.

Click on Save Menu when you』re done.

Consider starting a blog

A blog can be an excellent way to attract new visitors to your website and ultimately get more eyeballs looking at your business.

From a technical point of view, starting a blog with WordPress is more than simple. Or, to be more accurate, you already have a blog functionality integrated into WordPress from the get-go.

? WordPress was initially created to serve as a blogging tool, and only later on evolved into a fully-fledged website platform.

To create new blog posts, from the WordPress dashboard, go to Posts and click on Add New. You』ll see the same interface you saw when working on your standard pages.

new post

Simply type in your content, add a title, and click on the Publish button when you』re done.

? Building a successful blog is about much more than just writing up new posts and publishing them. If you want to learn how to dominate, read this guide – these are our tips on how to get from 0 to 400,000 blog readers a month.

Create dummy blog posts in bulk

While getting a new WordPress website rolled out, having some dummy blog posts for early testing can be useful.

The fastest way to create those is via WP-CLI.

To start, you can use a command I shared earlier:

wp post generate –count=10

This creates ten empty posts.

But if you want to do something cooler, you can use this:

curl http://loripsum.net/api/4 | wp post generate –post_content –count=10

This one creates ten posts, but this time each one has four paragraphs of dummy text in it.

Need 100 posts? No problem. Need ten paragraphs instead of 4, no problem. Just adjust the parameters.

Bonus: All WP-CLI commands in one place

We』ve gone through loads of different WP-CLI commands along the way as we were making a WordPress website. Here they are all in one place, save them for future use:

(In case you need explanations of what these commands do, please refer back to the previous sections in this guide.)

wp core download

wp config create –dbname=YOUR_DATABASE_NAME –dbuser=YOUR_DATABASE_USER –prompt=YOUR_P4SS
wp db create
wp core install –url=YOUR_DOMAIN.com –title=”SITE TITLE” –admin_user=ADMIN_USER –admin_password=ADMIN_P4SS –admin_email=YOUR@EMAIL.com

wp plugin delete hello

wp comment delete $(wp comment list –format=ids)
wp post delete $(wp post list –post_type=’post’ –format=ids)
wp post delete $(wp post list –post_type=’page’ –format=ids)
wp site empty
wp site empty –uploads

wp plugin install PLUGIN_SLUG
wp plugin activate PLUGIN_SLUG

wp theme install THEME_SLUG
wp theme activate THEME_SLUG

wp rewrite structure ‘/%postname%/’
wp option update blog_public 1
wp option update blogname “Your site name”
wp option update blogdescription “Your site description”
wp option update default_comment_status closed
wp option update default_ping_status closed
wp option update timezone_string “America/New_York”

wp user create john john@example.com –role=author

wp post create ./PAGE-CONTENT.txt –post_type=page –post_title=’PAGE FROM FILE’
wp post create ./about.txt –post_type=page –post_title=’About’
wp post create ./contact.txt –post_type=page –post_title=’Contact’
wp post create ./privacy.txt –post_type=page –post_title=’Privacy Policy’

wp post generate –count=10
curl http://loripsum.net/api/4 | wp post generate –post_content –count=10

Conclusion on how to make a WordPress website

That』s it; our path to learning how to make a WordPress website efficiently is done!

The cool thing about this process is that it』s repeatable and can be applied over and over again, no matter what type of WordPress website you』re working on.

That said, getting your website online is just the start of the journey for most users. Getting people to find the website and then keep coming back to it is a whole different challenge.

Here are some of our other guides that help tackle this:

  • How to promote a WordPress website
  • How to monetize a WordPress blog or website

I hope this resource has been helpful. If you』ve enjoyed it, consider sharing it with someone who might find it helpful too.

Don』t forget to join our crash course on speeding up your WordPress site. With some simple fixes, you can reduce your loading time by even 50-80%:

* This post contains affiliate links, which means that if you click on one of the product links and then purchase the product, we』ll receive a commission. No worries though, you』ll still pay the standard amount so there』s no cost on your part.

相關文章