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 changes to the live server.
Now I've come across the problem that while everything works fine on the dev server, the live server doesn't pull the correct CSS stylesheets. In the <head>
of the HTML file I can see two links to the stylesheet, and both point to the development server URL rather than the live server URL.
If I'm not mistaken, this info is pulled from bloginfo('stylesheet_url')
.
Now I have no clue where the value for this comes from. I've searched every single file in the live installation and could not find any hardcoded links (apart from that I'd have remembered to have set up hardcoded links).
Where then is this value saved?
Many thanks in advance!
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:
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.
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)"
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 usuallywp_options
. Wheretemplate='your-theme-name'
. If you want to change the site url changesiteurl
row's value in the same table