Detailed steps for installing WordPress on CentOS 7

Source: Internet
Author: User

First, build the WordPress server environment requirements:

PHP 5.2.4 or later, MySQL version 5.0 or later.

Second, build the WordPress platform:
The following is an example of the Wordpress3.92 version, if you want to install the latest version, after the installation is complete, the management interface can be automatically upgraded to install the most recent version.

1, create a temporary folder, download the latest version of Wordpress3.92, both English and Chinese can:

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

2, unzip to the site root directory: Because I am using the lamp one-click installation package installed lamp, so the default website root directory for/data/www/default, everyone in the actual installation process attention to their root directory.

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

3. Change Wordpree folder owner and permissions

Chown-r Apache:apache/data/www/default/wordpresschmod-r 755/data/www/default/wordpress

4. Create a directory that can be uploaded upload, 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 the database can be accessed

CD/DATA/WWW/DEFAULT/WORDPRESS/CP wp-config-sample.php Wp-config.phpvim wp-config.php Modify the database name, database user name, database user password, respectively. Everyone according to the actual modification: define (' db_name ', ' wp_database '); Define (' Db_user ', ' root '); Define (' Db_password ', ' root '); After the modification is complete: wq!

6. Browser browsing and installation

Browser input http://http://127.0.0.1/wordpress/wp-admin/install.php After the final login installation: Enter the site name, login username, password, the mailbox can complete the installation of WordPress. Because I was built locally, so is 127.0.0.1, if you apply for a domain name, here is the domain name.

7, turn on support website fixed link modification and redirection function.    Edit Master Profile:

 Vi /etc/httpd/conf/httpd.confallowoverride none modified to: Allowoverride all and then restart the service:systemctl  Restart httpd.service create the. htaccess file: Touch /data/www/default/wordpress/.htaccess edit the. htaccess file: Vim  /data/www/default/wordpress/.htaccess See if you have the following content, do not add yourself, it is possible that the site will be automatically generated. <ifmodule mod_rewrite.c>rewriteengine onrewritebase /wordpress/rewriterule ^index\. php$ - [l]rewritecond %{request_filename} !-frewritecond %{request_filename} !- drewriterule . /wordpress/index.php [l]</ifmodule> Modify. htaccess file permissions: chmod 664 / Data/www/default/wordpress/.htaccess Modify to 664 to allow the site to support automatic Updates, or can be modified to 644. 

to this point, WordPress has been completely installed on the CENTOS7, you can use it to build any site you want.

Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/

Detailed steps for installing WordPress on CentOS 7

Related Article

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.