In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
The knowledge of this article "how to install WordPress in CentOS6" is not understood by most people, so the editor summarizes the following contents, detailed contents, clear steps, and has a certain reference value. I hope you can get something after reading this article. Let's take a look at this "how to install WordPress in CentOS6" article.
1. Two ways to get wordpress
First of all, you can go to the official wordpress website to see the download address of the latest wordpress.
First, use the mkdir command to create a random directory. Here you use wordpress, and use wget to request the download address of wordpress in this directory. Here, use:
Wget http://cn.wordpress.org/wordpress-3.9-zh_cn.zipunzip wordpress-3.8-zh_cn.zip
Use unzip to extract the zip file.
Then edit the wp-config-sample.php file, mainly modify the database information.
Nano wp-config-sample.php/** mysql database name * / define ('db_name',' wordpress'); / * * mysql database user name * / define ('db_user',' root'); / * * mysql database password * / define ('db_password',' password') / * * mysql host (no modification) * / define ('db_host',' localhost')
Let's fill in the name of the database here at random, because the database has not been established yet. The user name and password of the database are filled in in the previous step, and you need to enter them here.
Remember that when ctrl + o saves the file, select the file name wp-config.php.
Then copy all the files to the / var/www/html directory. Use
Cp-rf wordpress/* / var/www/html/
Wordpress is done in this way, but some students may be a little afraid of command operation. Under windows, you can use filezilla software to upload local files to vps. Filezilla in the site manager of the file, select New site, and select sftp for the protocol of the configuration interface.
On the right is the linux directory, and on the left is your computer. Right-click on a directory or file to upload. Selecting a directory or file on the right can also be downloaded locally, just like ftp.
The upload speed is only about 40-50kb/s
two。 Create a new database in mysql
Mysql-u root-p
Enter the above command to enter the mysql, to enter the password.
Create a new database called wordpress with the following command.
Create database wordpress
With the above two steps, visit the ip address, and a brand new wordpress can be established. Visit your registered domain name and you should be able to install wordpress.
3. Import sql Fil
If you are going to vps from a virtual host, you will need to import the sql file. You can use the following command:
Mysql-u user name-p password database name < database name. sql
Notice that there is no space between u and user name, p and password!
4.wordpress simple setup
4.1 modify the size limit of uploaded files
Try to upload an attachment to the background and you will find:
Maximum upload file size: 2mb. Very painful. How to modify it?
Use locate to search for php.ini file locations.
Locate-I php.ini
Then edit it:
Nano / etc/php.ini
In nano, you can search for text through ctrl + w. Search here, post_max_size and upload_max_filesize, and make them bigger. For example, I have changed them to 64m.
4.2 override url Settings
Except for the url format of default, everything in wordpress needs to be re-supported by url. It is not supported by default. Vps can only be done on its own, and virtual hosts are generally enabled by default.
Nano / etc/httpd/conf/httpd.conf
Need to edit the httpd.conf file. Ctrl + w search for "/ var/www/html" and find:
...
# allowoverride controls what directives may be placed in .htaccess files.
# it can be "all", "none", or any combination of the keywords:
# options fileinfo authconfig limit
#
Allowoverride none
Change allowoverride none to allowoverride all
4.3 install plug-in, update need to enter ftp account
Nano / etc/httpd/conf/httpd.conf
The main reason for this is the lack of authority.
Also edit this file and find this:
User apache
Group apache
Change group to root. Of course it's risky, but it's the fastest...
Another way is to give ownership of all wordpress files to the user apache.
All three of the above operations need to restart apache to take effect.
Sudo service httpd restart
Using git in 5.vps
You can install git with the following command, which is very simple
Sudo yum install git above is about the content of this article on "how to install WordPress in CentOS6". I believe we all have a certain understanding. I hope the content shared by the editor will be helpful to you. If you want to know more about the relevant knowledge, please follow the industry information channel.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.