简体   繁体   中英

How to set site url/base url in wordpress?

I'm new to wordpress, I just install wordpress and want to set my site's base_url . Please any one help me with this. Thanks in advance.

在“wp_options”表中设置“siteurl”和“home”字段值。

要在您的 wordpress 应用程序中设置 url,只需转到左侧的“设置”选项卡,然后转到“常规”选项卡并设置站点地址(url)。

您可以在数据库表 wp_options 或文件 wp-config.php 中更改它,如下所示: https ://codex.wordpress.org/Changing_The_Site_URL

Follow these steps

  1. After moving your site files (if necessary), log into your your WordPress Dashboard as an administrator.
  2. Next, click on Settings from the menu, and then General, Click on General to get started
  3. The two fields we'll change are WordPress Address (URL) and Site Address (URL).
  4. Enter the URL you'd like to use. For this example, we'll change the two fields to http://dv-example.com .
  5. Scroll down the page and click on the Save Changes button.

Ref link: https://mediatemple.net/community/products/dv/204405334/how-can-i-change-the-domain-name-for-my-wordpress-site

Hope this will help you!

just insert code

<?php echo home_url(); ?>

for exemple:

<link rel="icon" href="<?php echo home_url();?>/wp-content/uploads/2015/02/logo-symbol-43x43.png" sizes="32x32" />

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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