Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install WordPress for CentOS7

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly explains "how to install WordPress in CentOS7". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install WordPress in CentOS7.

WordPress is a blogging platform developed in PHP language. Users can set up their own blogs on servers that support PHP and MySQL databases.

First, build Wordpress server environment requirements: php 5.2.4 or higher, MySQL 5.0 or higher. 2. Build a Wordpress platform:

The following takes the Wordpress3.92 version as an example. If you want to install the latest version, the management interface can automatically upgrade and install the latest version after the installation is completed.

1. Set up a temporary folder to download the latest version of Wordpress3.92, both in Chinese and English:

Mkdir / tmp/wpcd / tmp/wpwget http://wordpress.org/latest.zip

2, extract to the site root directory: because I use the LAMP one-click installation package to install LAMP, so the default site root directory is / data/www/default, everyone in the actual installation process to pay attention to their own root directory.

Unzip-Q latest.zip-d / data/www/default/

3. Change the wordpree folder owner and permissions

Chown-R apache:apache / data/www/default/wordpresschmod-R 755 / data/www/default/wordpress

4. Create a directory upload that can be uploaded, and change the owner to apache.

Mkdir-p / data/www/default/wordpress/wp-content/uploadschown-R: apache / data/www/default/wordpress/wp-content/uploads

5. Modify the configuration file so that you can access the database

The cd / data/www/default/wordpress/cp wp-config-sample.php wp-config.phpvim wp-config.php modification part is the database name, database user name, and database user password, respectively. According to the actual modification, you can modify: define ('DB_NAME',' wp_database'); define ('DB_USER',' root'); define ('DB_PASSWORD',' root'); after modification: wq!

6. Browse and install the browser

The browser can enter http://http://127.0.0.1/wordpress/wp-admin/install.php for the final login installation: enter the site name, login name, password, mailbox to complete the installation of Wordpress. Since I built it locally, it is 127.0.0.1. If I apply for a domain name, this is the domain name.

7. Enable the fixed link modification and redirection function of the support website. Edit the main profile:

Vi / etc/httpd/conf/httpd.confAllowOverride None is modified to: AllowOverride All and then restart the service: systemctl restart httpd.service create .htaccess file: touch / data/www/default/wordpress/.htaccess edit .htaccess file: vim / data/www/default/wordpress/.htaccess to see if the following content is not added, it is possible that the website will be automatically generated. RewriteEngine OnRewriteBase / wordpress/RewriteRule ^ index\ .php $- [L] RewriteCond% {REQUEST_FILENAME}!-fRewriteCond% {REQUEST_FILENAME}!-dRewriteRule. / wordpress/index.php [L] modify .htaccess file permissions: chmod 664 / data/www/default/wordpress/.htaccess can be changed to 664 to enable the website to support automatic updates, or to 644.

At this point, Wordpress is fully installed on Centos7, and you can use it to build any website you want.

At this point, I believe you have a deeper understanding of "CentOS7 how to install WordPress". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report