Where is the value for Wordpress bloginfo('stylesheet_url') saved?

后端 未结 3 1272
无人及你
无人及你 2020-12-19 18:05

I\'m setting up a Wordpress site (as a newbie). The way it works is that I have an installation on a development server where I change stuff and then someone else moves my c

相关标签:
3条回答
  • 2020-12-19 18:47

    If you're going to move databases from local to live - or from any domain to another - you need to change URLs in the database. Also see Moving WordPress « WordPress Codex

    You can use these queries in phpmyadmin to change URLs:

    UPDATE wp_options SET option_value = replace(option_value, 'http://olddomain.com', 'http://newdomain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
    
    UPDATE wp_posts SET guid = replace(guid, 'http://olddomain.com','http://newdomain.com');
    
    UPDATE wp_posts SET post_content = replace(post_content, 'http://olddomain.com', 'http://newdomain.com');
    
    UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://olddomain.com', 'http://newdomain.com');
    

    A better method (answer updated 8/01/2014) is to use https://interconnectit.com/products/search-and-replace-for-wordpress-databases/ , which correctly deals with serialized data in the database; the SQL queries abov will break serialied data, and you may lose some theme and ohter options as a result. That script is recommened on the http://codex.wordpress.org/Moving_WordPress Codex page.

    0 讨论(0)
  • 2020-12-19 18:47

    The problem is probably with the base URL, and not specific to the CSS. Look under the admin panel, Settings -> General -> "WordPress address (URL)" and "Site address (URL)"

    0 讨论(0)
  • 2020-12-19 18:50

    Well its not saved, the stylesheet_url is you current themes url. wp-content/themes/your-theme/ . You current theme's folder name is stored in the database's options table usually wp_options. Where template='your-theme-name'. If you want to change the site url change siteurl row's value in the same table

    0 讨论(0)
提交回复
热议问题