Home > Backend Development > PHP Tutorial > Use wordpress to quickly build a beautiful website (1)

Use wordpress to quickly build a beautiful website (1)

PHPz
Release: 2023-03-07 09:06:01
Original
3047 people have browsed it

WordPress is a blogging platform developed using PHP language. Users can set up their own website on a server that supports PHP and MySQL database. Through the wordpress platform, creating a website is as easy as setting up your own QQ space.

Xiao Xianer I summarized the following article based on the tutorials of Ninghao.com, hoping to make progress and learn together with other website building enthusiasts.

1. Basic preparation

1. Download wamp (under windows). The function of wamp is to integrate a series of software required to develop a dynamic website or a server, so with wamp, you can create your own website on it. Wamp integrates apache, mysql, and php. So using a wamp is enough to support us in building a unique website. After downloading and installing wamp, start wamp and wait for the icon to turn green

            2. If you want to write a website built with the wordpress platform, you need to download a wordpress, download it from the wordpress.org website , then unzip it, rename the unzipped package to the name of the website you want, and then put it in the www folder in the wamp directory.

2. Start building the website

1. Before building the website, open wamp and select PHPadmin. After a page appears, select the database option to create a database for your own website as shown below

2 2. Now, because we have put the decompression and renamed WordPress in the www in the WAMP directory, now open the browser The wordpress configuration interface can appear.

3. Since many arrogant little users do not want to enter the extra characters of localhost, some users want to remove this localhost and directly enter the website name and / to have their own website appear. We have to provide This is built using Virtual Host

C:\Windows\System32\drivers\etcAfter configuring this file, you can directly enter the name of the website you want to edit in the address bar. Okay, instead of entering localhost, use Editor to open the hosts file, and then enter 127.0.0.1 website name in it. This 127.0.0.1 represents the IP address of this machine, which is equivalent to the local Computer, the latter part (originally localhost) is a small alias of the local computer, which is equivalent to giving the local computer a new name. This is the function of the virtual host. It is not completed. You still need to open the file C:\wamp\bin\apache\apache2.4.9\conf (this address is different for different users, depending on your wamp installation address) and find httpd .conf file, write a paragraph in it Code, configure the virtual host, tell Apache, after typing in the website name, enter the host and restart wamp

The code to be written
Include conf/extra/httpd-vhosts.conf (remove the # sign in front of this code), and write the following code at the end, change the following content according to the website name and wamp installation path
<VirtualHost *:80>
        
Document
Root "c:/wamp/www/memorypub"
        ServerName memorypub
        
Dir
ectoryIndex index.php
        <Directory  "c:/wamp/www/memorypub">
            Options Indexes FollowSymLinks
            AllowOverride None
            Order allow,deny
            Allow from all
        </Directory>
</VirtualHost>
Copy after login

4. After completing the above steps, enter the website name directly, and the wordpress configuration interface will appear. This configuration interface is as shown below


The name of this database must be Write the name of the database previously generated in PHPadmin. The username must be root, and the password is blank by default. For mac users, the password is also root, and other default values ​​are sufficient. After filling in, click Submit, and a message will appear. Web configuration interface, this is the last step to generate your exclusive website, isn't it a little exciting?

5. Improve the configuration interface

Enter some of your private information, and then you can install wordpress, which is just the prototype of the website you want to build in the future.

3. Basic elements (article page)

Most websites display articles and pages to users, so this is what I call the basic element, but some readers may have questions, ## How to deal with #VIDEO and PICTURE? In fact, to some extent, the video is just an article without text and only video, and the same is true for pictures.


The picture above is the backend interface of the main editor of WordPress. We can gradually improve our website based on this interface. Writing an article is the first step. Click on the article. By choosing to create a new article, you can write some articles based on our theme and the content that the website needs to display to viewers. It is particularly important to pay attention to typesetting. The advantage of WordPress is that it allows us to see the preview directly. Windows users can preview by pressing Ctrl and viewing the article. If you want to add your own css style, you can click on the text field in the upper right corner of the article editing bar (the default selection is visualization), and you can see that this includes some HTML language. We can add our own styles and some

HTML tags that we want.

One good thing about wordpress is that you don’t need to publish it in time. Scheduled or scheduled delivery provides great convenience for future website maintenance and updates.

Generally, articles are dynamic, while pages are

static. The author, publication time and other content can be displayed below the article. These displayed contents can be selected, as can the comments on this article. Optional.

The above is the detailed content of Use wordpress to quickly build a beautiful website (1). For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template