您现在的位置是:首页 > cms教程 > WordPress教程WordPress教程

centos7.3怎么安装wordpress

侯善稚2025-03-17WordPress教程已有人查阅

导读一、安装并配置数据库1.安装mariadb#yum install -y mariadb-server mariadb2.启动数据库并设置开机自启#systemctl start mariadb &&systemctl enable mariadb3.初始

一、安装并配置数据库
1.安装mariadb
#yum install -y mariadb-server mariadb
2.启动数据库并设置开机自启
#systemctl start mariadb &&systemctl enable mariadb
3.初始化数据库
#mysql_secure_installation
4.登录数据库并创建wordpres库
#mysql -u root -p
>create database wordpress;
>grant all privileges on wordpress.* to 'wordpress'@'localhost' identified by 'wordpress';
>grant all privileges on wordpress.* to 'wordpress'@'%' identified by 'wordpress';
二、安装Apache+php7
1.安装apache
#yum install -y httpd &&systemctl enable httpd &&systemctl start httpd
2.安装php
#yum install -y epel-release && rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
#yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64 -y
3.配置apache
删除欢迎页
#rm -rf /etc/httpd/conf.d/welcome.conf
#vi /etc/httpd/conf/httpd.conf
DirectoryIndex index.php index.html #添加对PHP的支持
三、下载wordpress中文版
#cd /opt
#yum install -y wget
#wget https://cn.wordpress.org/wordpress-4.9.1-zh_CN.tar.gz
#tar -xzvf wordpress-4.9.1-zh_CN.tar.gz
#cp -r wordpress/* /var/ /html/
四、重启服务
apache#systemctl restart httpd
五、访问http://your_ip
如果报错,更改html属主,属组 (不改属组属主在后期升级或导致没有权限创建文件或写入)
chown apache. -R html/
附:更改对上传文件大小的限制:
#vi /etc/php.ini
#找到下面3行,更改值upload_max_filesize = 2M
post_max_size = 8M
max_execution_time = 30
六、解决安装WordPress主题及插件需要输入FTP问题在wp-config.php文件中添加脚本方式
define("FS_METHOD","direct");
define("FS_CHMOD_DIR", 0777);
define("FS_CHMOD_FILE", 0777);

本文标签:

很赞哦! ()

相关源码

  • (PC+WAP)蓝色钢结构机械五金工程建筑基建营销型pbootcms模板下载于PbootCMS开发的钢结构与工程机械专用模板,助力企业构建专业级产品展示平台;模板内置工程案例展示、产品参数对照表等专业模块,预设项目进度、施工方案等建筑行业专属栏目查看源码
  • pbootcms模板(PC+WAP)火锅加盟餐饮美食类带留言源码基于PbootCMS内核深度开发,为火锅、餐饮品牌打造的营销型解决方案。采用红色主题传递行业活力,实现PC与WAP端适配。查看源码
  • (自适应响应式)绿色环保材料设备科技类营销型网站pbootcms源码下载本模板基于PbootCMS开发,主要面向环保设备、环保材料及相关科技企业。采用HTML5+CSS3技术构建,具备响应式特性,确保在各类设备上均有良好展示效果。查看源码
  • pbootcms模板(PC+WAP)微信小程序开发公司网站本模板为微信小程序开发代理、软件开发公司等企业设计,基于PbootCMS内核开发,支持PC+WAP双端响应式布局,数据实时同步,适用于多行业快速建站。查看源码
  • (自适应)幽默笑话脑筋急转弯搞笑趣图博客pbootcms模板下载本模板基于PbootCMS系统开发,专为幽默笑话、搞笑趣图类网站设计。采用轻松活泼的布局风格,突出娱乐内容分享特色,适合各类笑话、段子、搞笑图片等内容展示。查看源码
  • 帝国CMS游戏应用APP推广下载站模板免费下载本模板为移动应用推广、手机游戏推广行业设计,集成H5游戏平台与APP下载功能,支持PC端与移动端自适应访问。专注于为应用开发商、游戏发行商提供专业的线上推广展示平台。查看源码
分享笔记 (共有 篇笔记)
验证码: