- WordPress 4.0 Site Blueprints(Second Edition)
- Rachel McCollin
- 340字
- 2021-07-16 19:58:16
Making your WordPress site live
Once you have all your content in place, have installed and configured any plugins you want to use, and are happy with your widgets and with any customizations you've made to the design, it's time to go live.
If you aren't running your old site on the server still and didn't install WordPress in a subdirectory, this is very simple. Perform these steps:
- Go to Settings | Reading.
- Uncheck the Search Engine Visibility checkbox.
That's it! Search engines can now find your site. You'll need to do a bit more to publicize it, but it's now public. Enjoy!
However, if you still have your static site running, there's a bit more to do:
- In your FTP client or in File Manager in cPanel, find the folder where the WordPress files are located and find two files—
index.php
and.htaccess
. If you haven't made any changes to permalinks, you won't have an.htaccess
file, so just work withindex.php
. - Copy the two files (or one if you don't have
.htaccess
) to the next directory up, that is,public_html
. - Open the copy in
public_html
and find the line that reads as follows:require ('./wp-blog-header.php')
- Change it to this:
require ('./XXX/wp-blog-header.php'),
Here,
XXX
is the name of your subdirectory. - Save the file.
- Back in the WordPress admin, go to Settings | General.
- Edit the Site Address and WordPress Address fields so that they read as follows, where
site.com
is your domain andfolder
is the name of your subfolder where WordPress is stored. Change them to the following, making sure you spell everything correctly to avoid redirect loops:- WordPress address (URL):
http://site.com/folder
- Site Address (URL):
http://site.com
- WordPress address (URL):
- Click on the Save Changes button.
- Back in your FTP client, delete all the files from your static site. If you want to back them up, copy them to your PC, but make sure they're all gone from your server to avoid any conflicts.
- Now visit your site. You'll find that it uses your main domain name and not the subdirectory.
推薦閱讀
- FreeSWITCH 1.8
- Mastering Ubuntu Server
- Java軟件開發基礎
- Swift語言實戰精講
- IBM Cognos Business Intelligence 10.1 Dashboarding cookbook
- 響應式Web設計:HTML5和CSS3實戰(第2版)
- Visual Studio Code 權威指南
- 區塊鏈架構之美:從比特幣、以太坊、超級賬本看區塊鏈架構設計
- Distributed Computing in Java 9
- Kotlin語言實例精解
- Flask開發Web搜索引擎入門與實戰
- 循序漸進Vue.js 3前端開發實戰
- Puppet Cookbook(Third Edition)
- Serverless從入門到進階:架構、原理與實踐
- C#從入門到精通(微視頻精編版)