Detailed steps for installing WordPress on CentOS 7

Source: Internet
Author: User

Detailed steps for installing WordPress on CentOS 7

I. Wordpress server environment requirements:

Php5.2.4 or later, MySQL5.0 or later.

2. Build the Wordpress platform:
The following uses Wordpress3.92 as an example to describe how to install the latest version. If you want to install the latest version, you can automatically upgrade the latest version on the management interface after the installation is complete.

1. Create a temporary folder and download the latest version of Wordpress3.92. Both Chinese and English can:

mkdir/tmp/wpcd/tmp/wpwgethttp://wordpress.org/latest.zip

2. decompress the package to the root directory of the website. Because LAMP is installed using the one-click LAMP installation package, the default root directory of the website is/data/www/default, pay attention to your root directory during actual installation.

unzip-qlatest.zip-d/data/www/default/

3. Change the owner and permissions of the wordpree folder.

chown-Rapache:apache/data/www/default/wordpresschmod-R755/data/www/default/wordpress

4. Create an upload directory 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.

Cd/data/www/default/wordpress/cpwp-config-sample.phpwp-config.phpvimwp-config.php to modify the part of the database NAME, database user NAME, Database User Password, according to the actual modification: define ('db _ name ', 'wp _ database'); define ('db _ user', 'root'); define ('db _ password', 'root'); after modification, wq!

6. browser Installation

Enter http: // 127.0.0.1/wordpress/wp-admin/install in the browser. after php, you can perform the final login and installation: enter the site name, login account name, password, and mailbox to complete the installation of Wordpress. Because I set it locally, it is 127.0.0.1. If you apply for a domain name, it is the domain name.

7. Enable fixed link modification and redirection. Edit the main configuration file:

Vi/etc/httpd/conf/httpd. change confAllowOverrideNone to AllowOverrideAll and restart the service: systemctlrestarthttpd. service creation. htaccess file: touch/data/www/default/wordpress /. htaccess editing. htaccess file: vim/data/www/default/wordpress /. htaccess: Check whether the following content exists. if the content is not added by yourself, the website may be automatically generated. <IfModulemod_rewrite.c> RewriteEngineOnRewriteBase/wordpress/RewriteRule ^ index \. php $-[L] RewriteCond % {REQUEST_FILENAME }! -FRewriteCond % {REQUEST_FILENAME }! -DRewriteRule. /wordpress/index. php [L] </IfModule>. htaccess File Permission: chmod664/data/www/default/wordpress /. if you change htaccess to 664, the website can be automatically updated or changed to 644.

So far, Wordpress has been fully installed on Centos7. You can use it to build any website you want.

Address: http://www.linuxprobe.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.