Please refer to my answer in another post:
As a dead artist who does not know programming at all and has not passed the third level of English, he spent a day this weekend to set up his own personal blog:
// buqingj.com/
If you think this blog is quite in line with your expectations, then I think you can listen to me next.
A few years ago, I thought about building a personal website of my own, so I specially studied the skills required for building a website. Unfortunately, the content of Zhihu was not so comprehensive at that time, so I knocked a few lines of table on DW and ended it. Recently, I saw that the blog of our product manager was very popular. I was very envious of it, and it also aroused a little spark in my heart. So I started my journey of building a website with a take away in a spare afternoon.
It is different from the method mentioned by other students. Next, I want to introduce in detail how to use a dedicated server to build a personal website with the help of WordPress platform, as well as the problems I encountered in the operation process. If you have requirements for website quality, access speed and stability, or you want to do something else with the help of the server in the future, I believe this article will be helpful to you.
First, you need to complete two things before setting up a blog:
1: Buy a separate domain name. I recommend the. com suffix. After all, it is an international root domain name, and the price is not much more expensive,
Usually 60-100 yuan a year. It is recommended to purchase through foreign channels. The goDaddy website strongly recommended by friends is a good choice. It supports Alipay payment. There are many detailed online purchase tutorials. Please search "goDaddy domain name registration" by yourself.
2: Buy server space. Here are several options. Let me briefly introduce them:
Virtual host
: The straight point is to divide the space of a server into multiple virtual spaces, and then allocate system resources to each space user. The advantage is that the price is cheap, while the disadvantage is that there are many restrictions due to the lack of complete host functions.
Virtual Private Server VPS, as it is often said, is the use of software to divide a server into multiple virtual servers. The system, space and CPU resources on the VPS are exclusive to users. The operation and management can be seen as Stand alone server
Same.
Independent server: Websites that choose independent servers usually need to undertake huge user visits, which has probably risen to the professional level of the company. Of course, if you are a local tyrant and have to use an independent server to make a WP, then I didn't say that.
Most friends choose the first option: virtual host. The advantages are simple operation, low price, and even the one button installation option directly provided in the host background. The disadvantage is that there are many restrictions, and the website stability and access speed cannot be guaranteed due to the uneven quality of space providers.
What I want to mention is the second way to build a website using VPS, which is also my own choice.
1、 Note on VPS selection: Common host operating systems are divided into Linux and Windows. As an open source system, Linux host is absolutely superior to Windows host in terms of system cost, performance and stability, so I will only discuss how to build Linux host here. Similar to domain names, VPS can be purchased through domestic and foreign channels. The difference is that the domestic host purchase process is convenient, but needs to be filed; The purchase process of foreign hosts is slightly complicated due to language problems, but the price and restrictions are more advantageous than those of domestic hosts. VPS suppliers with good reputation abroad include DigitalOcean, Linode, etc. Such hosts usually have guaranteed service and quality, and the price varies from $30-60 per month. As a novice, the author chose another cheaper VPS, called Edition Tiler, which costs $12 a year. As for domestic hosts, there are many detailed recommendations from friends and on the Internet. The specific choice depends on your own situation.
In addition, I need to mention a few tips. It is recommended to measure the speed before buying the host, because the expensive host is not necessarily the most suitable one. My network is Beijing Unicom, but for the Linode server, which has the highest price, the packet loss rate is as high as 10%.
Speed measurement method:
Windows PC:
// jingyan.baidu.com/artic le/a24b33cd55f4ba19ff002b7a.html
Mac:
// jingyan.baidu.com/artic le/ed15cb1b789f1c1be2698149.html
2、 After purchasing VPS, the supplier will provide you with several information: the server's IP, SSH port number, server root password, and the background address of logging in to the management server from the web page. With the above three information, you can start to build your server environment. Next, you need a software to connect to the server. On the Windows platform, I recommend using putty. The download address is: // the.earth.li/~sgtatham/ putty/latest/x86/putty.exe
This is a very simple tool. You just need to input your server information according to the figure below, and then click Open to start your journey of building a website.
After successfully connecting to the server, you will jump to the interface shown below. This guy is called Vim editor Don't be frightened by its appearance here. We can play like a small white code.
First, enter your user name, which is usually root by default. Then press the Enter key, and the system will prompt you to continue entering the password. Here is a point that needs to be highlighted. When entering the password, there will be no display, so you just need to press the Enter key after entering the password. At this time, if the system displays your last login information on the next line, congratulations. You have successfully connected to your server.
Insert a brief introduction to the vim editor here:
It can be understood as two modes during operation: one is "general mode", the other is“ Edit Mode ”。 The former can control the movement of the screen cursor and the deletion of characters, words or lines; The latter can be used for text input. Simply speaking, press the letter "i" to enter the "editing mode". At this time, the word "- INSERT -" will be displayed in the lower left corner, indicating that you have entered the editing mode. At this time, you can start to input any text. In this mode, press the "ESC" key to switch back to the "general mode". At this time, you can move the cursor, delete text and other operations.
We copy the code from the web page, and then directly click the right mouse button in the editor to paste.
In editing mode, press x to delete the current character.
In command line mode, enter: wq (with a colon) to save and exit the current file.
Close this window to exit the remote connection.
Knowing these commands can make you more fluent in subsequent operations. Most of the tasks in the following tutorial are simple copying and pasting, so don't worry about your own uncertainty.
A more detailed literacy post for novice vim editor is attached here. It is recommended to take 5 minutes to read it, so that you can fully understand the subsequent operations. Address:
Literacy Action 9: Basic usage of Vi editor!
3、 Next is the environment deployment. Before proceeding to the following steps, I recommend that you first resolve your domain name to your own server through DNSPod. Specific steps can be referred to
Methods mentioned by students in the article:
How to build a WordPress blog with its own domain name- WordPress
, or search by yourself.
4、 Wordpress requires PHP, MySQL and a Web server environment. So what we need to do next is to build such an environment on the server, usually called LNMP. It sounds very complicated, but don't worry, some enthusiastic netizens have already prepared relevant Xiaobai tutorials for us. A summary of detailed links is attached here:
How to deploy an LNMP environment with push: // lnmp.org/install.html How to add a virtual host, that is, bind your website domain name on VPS: // lnmp.org/faq/lnmp-vhost -add-howto.html The following steps are completed. This article integrates the first two articles together. Starting from Step 13, it adds the following steps to install wordpress: upload the installation files through FTP (this step can also be done directly through putty, which is faster, but slightly more complicated.) and create the corresponding database. Address: // blog.hachke.cn/read-896 .html
Note: In the third tutorial, when using winscp software to connect to the server through SFTP, you need to enter your server IP, port number, user name and password. My test result here is that the port number is the SSH port number, and the user name and password are the user name and password entered to connect to the server through putty. Other methods cannot be connected.
5、 After completing the above steps, enter your domain name address, and you will automatically jump to the WordPress installation interface. The next steps are very simple. Please refer to the official website or online tutorial for relevant operations.
The whole process seems very complicated, but if you follow the above steps one by one, you will find that the operation is quite simple. At the same time, your sense of achievement will be multiplied after completion. Of course, there may be a simpler implementation method in the process, but the above steps are effective methods that I have repeatedly used and personally tested. If you encounter any problems during the installation process, please send me a private message, and I will try my best to help you.
--------------------------------------Gorgeous dividing line-----------------------------------------------
As a designer, I am shocked to write here. I will also attach the problems I encountered during the initial installation and use of WordPress. Even if you build WordPress through other host methods, I believe that the following content will still help you So, should I give a praise next^_^
--------------------------------------Updated on May 18, 2015-----------------------------------------------
The following is a summary of common problems and solutions after the initial installation of WordPress:
1、 After WordPress installed the theme in the LNMP environment, the website background settings do not display:
1. To edit php.ini The default location is/usr/local/php/etc/php. ini, so we need to use putty to connect to the server and open the file. The method is to enter the following command vi/usr/local/php/etc/php. ini after logging in
If the location is incorrect, you can also use the find command to find the location of php.ini: find/- name php.ini or log in to the website php background to view.
2. Find the disable_functions string and enter the following command:/disable_functions
3. Remove the scandir after it (press the x key to delete a single character of the current cursor). Press esc to exit editing mode. Then enter: wq! Save it.
4. Restart php. Enter the following command:/etc/init.d/php-fpm restart
2、 How to add favicon (small square icon on the left of website address) to your website:
1. Design and make your favicon, or search relevant websites to download one.
2. Use the FTP tool to upload your favicon.ico file to the installation folder where the server website is located, namely the root directory.
3. Log in to the blog background and edit the theme file header.php , add the following code between<head>and</head>:
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<link rel="Bookmark" href="favicon.ico" />
3、 Background program upgrade or plug-in installation prompt requires input Account password Solution for:
Connect to the server through putty, enter the following command chown - R www: www/home/wwwroot and press Enter to grant www permission to the folder where the website is located, and then you can successfully upgrade and install plug-ins automatically.
4、 No display of user comment avatar:
Any theme is universal. Open the functions.php file in the background and copy the black area code of the article below to the front of the file, that is, the first<? After PHP, the problem is solved after saving.
//www. lijianlin.com/473.html
(Valid through personal test)
5、 How to delete the prompt code below the article comment box (for perfectionists only):
//www. nwber.com/? p=291
6、 Modify the background login address to greatly improve website security:
//www. wpdaxue.com/protected-w p-login.html/
7、 How to insert music into an article:
//www. wpdaxue.com/wp-player-2 .html
8、 How to reinstall WordPress:
1. FTP tool completely deletes all files in the root directory of WordPress.
2. Log in to the PHP background to delete the data table in the database.
3. Re upload the files in the WordPress folder to the directory, open the browser, enter the website address and reinstall WordPress