php - 服务器上传后整个 WordPress 主题重置为默认值

标签 php mysql wordpress wordpress-theming

我创建了一个 Wordpress 网站,自定义了 CSS 和 PHP,上传了图像,设置了 Woocommerce 等。当我将其上传到服务器时,我所做的所有更改都丢失了。此外,woocommerce 页面因此错误而停止工作:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@mysite.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

我上传的方式:

  1. 已将.htacces上传到public_html
  2. 已将 WordPress 目录内容上传到同一文件夹
  3. 从本地 phpMyAdmin 导出 .sql 数据库
  4. 将所有localhost/mysite/wordpresslocalhost:8012/mysite/wordpress替换为www.mysite.com(端口已指定)因为apache有问题,所以我必须配置它)
  5. 在 cpanel 中创建了数据库
  6. 在 cpanel 中创建了用户
  7. 更改了 wp_config.php 文件中的 db_name、db_user 和 db_password(以 prefix_name 格式输入值)
  8. 以所有权限将用户添加到 cpanel 中的数据库
  9. 在服务器上的 phpMyAdmin 中导入数据库

我使用了 FileZilla(如果相关)。

这不是我第一次这样做,以前也遇到过问题,但不是这样的。我听说它与排序规则有关,但我尝试更改它 - 没有运气。

免责声明:我在谷歌上搜索了相关答案,但也没有帮助

最佳答案

检查apache httpd.conf(或http.conf)中的AllowOverride键,它必须是ALL而不是none

关于php - 服务器上传后整个 WordPress 主题重置为默认值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35580855/

相关文章:

php - Wordpress:使用函数 get_post_field() 获取帖子内容时,简码不起作用

php 为数据库中的每条记录做一些事情

phpmailer - 如何验证已发送的电子邮件是否到达目的地

php - Mysql WHERE NOT EXISTS(查询)OR(查询)

mysql - 从单机运行分片数据库

javascript - 用 React.js 组件替换部分 html 字符串并渲染(没有 dangerouslySetInnerHTML)

php - 如何从列名来自子查询的列中获取值?

mysql - Mysql中出现 "Insert into Non-key Column on Duplicate Update"怎么办?

php - 使用 php 和 sql 在表中创建超链接

mysql - 如何向所有帖子添加具有随机值的自定义字段