繁体   English   中英

使用//而不使用http或https的Wordpress?

[英]Wordpress using // without http or https?

由于某种原因,我的wordpress博客使用//指向资源的路径。 例如:

<link rel="canonical" href="//my.site.com/"/>

这对SEO不利,但我似乎无法找出解决方法。 有任何想法吗?

转到wp-config.php,在您的wordpress根目录中,尝试更改这两行以添加您的网站网址,

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

并打开functions.php文件并进行以下更改,

update_option('siteurl','http://example.com');
update_option('home','http://example.com'); 

然后尝试这些步骤,

1)Login to WordPress admin dashboard
2)Click on Settings >> General
3)Fill in your WordPress Address and Site Address and click Save.

最后这些步骤,

1)Backup your database in cPanel prior to making changes.
2)Use phpMyAdmin to manage your WordPress database.
3)phpMyAdmin select WordPress databaseSelect your WordPress database from the left.
4)Then select your wp_options table.
5)Click Edit beside either the siteurl or home entries.
6)Enter in your new value in the option_valuie field, then click Go

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

最后尝试参考,

http://www.inmotionhosting.com/support/website/wordpress/wordpress-changing-the-site-url-and-home-settings

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM