Wordpress安装-报错说明

一:下载WordPress安装包并解压

下载地址:https://wordpress.org/latest.tar.gz

  • 如果使用FTP将wordpress上传到远程服务器,先下载压缩包,之后上传
  • 如果使用shell访问远程服务器,直接在远程服务器上使用wget工具下载(Linux系统)
    • wget https://wordpress.org/latest.tar.gz
    • 解压缩:tar -xzvf latest.tar.gz

二:创建Wordpress数据库和用户

[[email protected]]# mysql -uroot -p
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 10.3.21-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type ‘help;‘ or ‘\h‘ for help. Type ‘\c‘ to clear the current input statement.

MariaDB [(none)]> drop database wordpress;
Query OK, 12 rows affected (0.300 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
+--------------------+
3 rows in set (0.000 sec)

MariaDB [(none)]> create database wordpress;
Query OK, 1 row affected (0.000 sec)

MariaDB [(none)]> grant all privileges on wordpress.* to "username"@‘hostname‘ identified by ‘password‘;
Query OK, 0 rows affected (0.001 sec)

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.000 sec)

MariaDB [(none)]> exit
Bye

三:设置wp-config.php文件

可以在运行安装脚本的时候让wordpress自行设置wp-config.php文件;也可以手动设置wp-config.php文件

  1. wp-config-sample.php重命名为wp-config.php
  2. 编辑wp-config.php文件
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define( ‘DB_NAME‘, ‘database_name_here‘ );		# 为创建worpress的数据库名称
    
    /** MySQL database username */
    define( ‘DB_USER‘, ‘username_here‘ );			# 为创建的wrdpress用户名
    
    /** MySQL database password */
    define( ‘DB_PASSWORD‘, ‘password_here‘ );		# 为创建的wordpress用户名的密码
    
    /** MySQL hostname */
    define( ‘DB_HOST‘, ‘localhost‘ );				# 为设置的hostname
    
    /** Database Charset to use in creating database tables. */
    define( ‘DB_CHARSET‘, ‘utf8‘ );
    
    /** The Database Collate type. Don‘t change this if in doubt. */
    define( ‘DB_COLLATE‘, ‘‘ );
    
    

四:设置文件在网站的位置

  • 使用的是nginx的话,默认文件位置为:/usr/share/nginx/html
  • 也可以自定义文件位置,需要修改nginx的网页配置文件,下面是我的wordpress网页配置文件
    [[email protected]]# cat /etc/nginx/conf.d/alongway.top.conf
    server {
        listen       80;
        server_name  alongway.top www.alongway.top;
    
        location / {
            root   /data/www/wordpress;
            index  index.php index.html index.htm;
        }
    
        error_page 500 502 503 504 403 404 /404.html;
        location = /404.html {
            root /data/www/blog;
        }
    
        location ~ \.php$ {
            root           html;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            include        fastcgi_params;
        }
    
    }
    

五:运行安装脚本

在web浏览器中与运行安装脚本

已经设置了网站根目录,并且已经把Wordpress文件放置到了网站根目录下,所以访问:

http://www.alongway.top/wp-admin/install.php



至此,安装完成

解决安装主题插件,更新需要FTP

在wordpress网站目录下的wp-config.php文件添加如下内容

vim wp-config.php
define(‘FS_METHOD‘,‘direct‘);
define(‘FS_CHMOD_DIR‘,0777);
define(‘FS)CHMOD_FILE‘,0777);

原文地址:https://www.cnblogs.com/moniter/p/12630125.html

时间: 2024-08-13 10:32:53

Wordpress安装-报错说明的相关文章

MSSQL 2012安装报错之0x858C001B

之前安装 Microsoft Sql Server 2012 R2 的时候总是报这样的错误: SQL Server Setup has encountered the following error: The SQL Server license agreement cannot be located for the selected edition, enterprise. This could be a result of corrupted media or the edition bei

mysql安装报错

如果编译时出现了以下错误:checking for tgetent in -ltermcap- nochecking for termcap functions library- configure: error: No curses/termcap library found说明 curses/termcap 库没有安装去下载一个ncurses-5.6.tar.gz,wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.6.tar.gztar zx

rlwrap安装报错You need the GNU readline 解决方法

首先大家肯定知道rlwrap是干什么的? 在linux以及unix中,sqlplus的上下左右.回退无法使用,会出现乱码情况.而rlwrap这个软件就是用来解决这个的. 这个错误曾经困扰我很久很久!下载readline 安装,安装好readline 还是无法运行rlwrap的安装程序 在网上搜寻很久才找到一个靠谱的解决方法 原来rlwrap这个程序的安装,需要依赖两个包, 一个是readline,这个readline在RHEL中已经集成了.不需要去专门下载 另外一个包 libtermcap-de

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt.

PHP编译安装报错: mcrypt.h not found. Please reinstall libmcrypt. 转载2016-04-25 12:40:44 标签:linuxitphp 解决方法: 1.为系统安装perl-Geo-IP,默认yum源中没有这个包,特意安装epel第三方yum源[[email protected] ~] rpm -Uvh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rp

jira安装报错 Unknown system variable 'default_storage_engine'

公司要使用BUG管理系统,所以对比了一下,最后决定安装jira. 安装后要在网页端,配置数据库,本地数据库是5.1的版本,一直有报错Unknown system variable 'default_storage_engine',在往上查询无果,my.ini设置也没用.把数据库远程连接到一个linux下的5.6版本就正常,最后决定安装5.6版本数据库. 问题解决.有些也是没办法的事情. jira安装报错 Unknown system variable 'default_storage_engin

DirectX 安装报错: 不能信任一个安装所需的压缩文件,请检查加密服务是否启用并且cabinet文件证书是否有效

DirectX 安装报错 不能信任一个安装所需的压缩文件,请检查加密服务是否启用并且cabinet文件证书是否有效 是直播软件open broadcaster software,这个软件安装的时候提示"your system is missing DirectX components that Open Broadcaster Software requires.Would you like to download them?"然后点是,就跳转微软的官方下载页面了. 下载dxwebse

Oracle 安装报错 [INS-06101] IP address of localhost could not be determined 解决方法

出现这种错误是因为主机名和/etc/hosts 文件不一致,只需要把主机名和其IP 写入/etc/hosts 文件,就ok了. 注意名字不能有下划线 修改network 文件之外,再使用hostname 命令指定一下主机名,就不用重启OS了. 1.     修改/etc/sysconfig/network 文件 [[email protected]~]# cat /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=s

Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory

Redis是一个开源的使用ANSI C语言编写.支持网络.可基于内存亦可持久化的日志型.Key-Value数据库,并提供多种语言的API. 本文为大家讲解的是Redis 2.8.18 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法,感兴趣的同学参考下. 错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or

解决SCCM 1606安装报错一例

解决SCCM 1606安装报错一例 这几天在公司测试SCCM 2016时遇到了如下错误: 博主在安装SCCM 2016时遇到了如下图所示的错误 错误提示:"在执行文件操作是,安装程序遇到错误,有关详细信息,请单击"查看日志"按钮": 打开日志显示如下内容: 错误原因如下: 因为安装SCCM时需要下载一些文件,楼主手欠将文件夹命名成带有中文字样的,如下图所示: 解决方法: 将安装SCCM时下载的文件名称命名为英文样式: 安装成功: