mysql - How to install Wordpress on Linux
问题描述
So I've been trying to install wordpress on my linux server and have been unsuccessful. I've been following a guide (Link at the bottom)
Now in the section where you create the wordpress database here where the instructions are:
mysql> CREATE DATABASE wp_myblog;
mysql> GRANT ALL PRIVILEGES ON wp_myblog.* TO 'your_username_here'@'localhost' IDENTIFIED BY 'your_chosen_password_here'; mysql> FLUSH PRIVILEGES;
mysql> EXIT;
am I suppose to replace 'your_usernamehere@localhost' with the username and IP address of my server (as in user@123434243 (Whatever the IP address of my server is))
And also for changing the wp-config.php file here:
define('DB_NAME', 'database_name_here'); /** MySQL database username */ define('DB_USER', 'username_here'); /** MySQL database password */ define('DB_PASSWORD', 'password_here'); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** 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', '');
Do I replace the highlighted blue sections with my own values? I'm so confused what to replace and what to copy verbatim, and then when I put my IP address on the browser it just shows 'page isn't working, unable to handle request'
Please help, I've been trying to install this for hours and it hasn't worked
https://www.tecmint.com/install-wordpress-on-ubuntu-16-04-with-lamp/
解决方案
您发布的指南建议数据库名称也应该更改。这很令人困惑,因为“localhost”通常是数据库服务器的名称,而不是数据库。
该指南指出应更改以下内容:
第 5 步
- database_name(它使用 WP_myblog)
- 数据库用户
- 数据库用户密码
然后它还说应该更改“数据库主机”。
从 ubuntu 站点查看此设置指南: https ://ubuntu.com/tutorials/install-and-configure-wordpress#1-overview
它似乎不需要数据库主机(几乎总是与 WP Host 服务器相同)
推荐阅读
- android - Firebase 身份验证:在身份验证期间没有收到来自 FirebaseUser 的电子邮件
- html - 从 Vue 调用 laravel 路由
- c# - 如何按部分将 JSON 文件反序列化为 C# 对象
- php - 按钮和表格下拉列表显示 Laravel 8 中的重复值
- kubernetes-helm - helm 语法 {{ something }} 和 {{- something }} 有什么区别?
- sql - 雪花 Where 子句没有过滤?
- java - 为什么这段代码说 x 没有初始化,但是当我们在 if 语句中执行 print 语句时它工作正常?
- javascript - 将对象作为道具传递
- python - 如何使用python从网站中提取所有链接
- discord - 用于将用户添加到频道的 Discord Reaction OR 命令