WordPress及WooCommerce安装

官网下载:https://wordpress.org/download/
最新版本:https://wordpress.org/latest.tar.gz
WooCommerce:https://wordpress.org/plugins/woocommerce/

  • 安装步骤:先使用HTTP域名安装,再配置为HTTPS域名
  • 管理路径:/wp-admin
  • 插件目录:wp-content/plugins/
  • WooCommerce样例数据:(1)Tools Import(2)WooCommerce products (CSV)(3)Run Importer

解决WordPress启用https后台打不开,css路径错误的问题

WordPress后台设置吧http改成https地址后,发现后台无法访问,前台css也加载不全,解决方法如下:

打开wp-config.php文件,添加如下代码:

1
2
3
$_SERVER['HTTPS'] = 'on';
define('FORCE_SSL_LOGIN’, true);
define('FORCE_SSL_ADMIN’, true);
1
2
3
4
5
6
define('FORCE_SSL_ADMIN', true);
// in some setups HTTP_X_FORWARDED_PROTO might contain
// a comma-separated list e.g. http,https
// so check for https existence
// if (strpos($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') !== false)
$_SERVER['HTTPS']='on';

Powered by AppBlog.CN     浙ICP备14037229号

Copyright © 2012 - 2020 APP开发技术博客 All Rights Reserved.

访客数 : | 访问量 :