Support » Localhost Installs » WAMP Installation: Database works, but image links & CSS don't

  • I just got new computer and have moved copy of my online site to local WAMP setup for development/design.

    I finally got my big datafile dump to work using BigDump, did a find/replace changing my site address to localhost in sql file.

    So, anyways http://localhost now pulls up my website, and all the blog contents from database correctly.

    However, the images & CSS don’t work now as they are still relative links.

    I added this to wp-config.php:


    … which only keeps the database info from working & still no images/CSS displayed.

    Does anyone have any ideas?

Viewing 13 replies - 1 through 13 (of 13 total)
  • BTW, I also tried adding this to the functions.php file of Theme:


    … the database continues to work, but still no images/CSS displayed.

    [No bumping, thank you.]

    Okay, I’ve made a bit of progress here on my own. I’ll keep working on it, and will keep posting any solutions I find, so any others in this ‘ignored’ Localhost Installs section (w/ similar problems) may get some of their questions answered.

    I changed the siteurl in wpress_options table from localhost/mySite to localhost, and so it can now find my css sheet. Hurray!

    Outstanding problem: my images & login page are still not being found. All other site navigation links function properly (only register/login don’t work).

    When I look at page source I see that image links are still not absolute urls (doesn’t have ‘http://localhost/’ in links). Which file changes this?

    Any ideas about my problem w/ Register/Login page not being found?



    Forum Moderator

    Thanks esmi. I just read your link and changed the home variable in wpress_options from http://localhost/mySite to http://localhost and it can now find my favicon. (hadn’t noticed before that it was missing) 🙂

    But my Login/Register page and images in a local file (they were copied down from hosted site) still cannot be found as they still lack absolute urls.

    Do you have any suggestions?




    Forum Moderator

    Have you run a full search & replace on the database?

    Yes, that was the first thing I did.

    On my hosted blog I upload all my pictures. Here is where the page source is now looking:


    I plugged some urls in and here is where apache actually finds the picture:


    I am wondering why the change I made for siteurl in wpress-options didn’t affect the pictures as well, since they affected CSS?

    Something else I noticed from the link you provided. It says go into admin to reset permalinks structure to .htaccess file

    My login & register (in header file) are using permalinks. How can I make changes to permalink if I cannot log in to admin module? And what kind of changes would I be making?

    I wish I could have my post moved back to Installation section. I suspect I would have had this resolved 24 hours ago. This section is like Siberia.

    In the event any experts ever stumble upon this ‘Localhost Installs’ section, could my BulletProof security be contributing to the problem?

    It seems .htaccess plays a role w/ permalinks/redirects/etc and Bulletproof is all about securing .htaccess files.



    Forum Moderator

    It’s possible. What urls are set in Settings -> General?

    Is there a way to tell without being logged in?

    I cannot log in to admin dashboard since login page is inaccessible. What table variables represent these site/blog urls, and I can check through PHPMyAdmin.

    Had assumed that these two urls were equivalent to siteurl and home variables in wpress_options table? If these table variables set the two urls in Settings->General then they both read http://localhost

    Here is the permalink setting selection on my hosted site (should be same locally): /%category%/%postname%/



    Forum Moderator

    If these table variables set the two urls in Settings->General then they both read http://localhost

    You’ve got the right variables. Can you confirm that WordPress is installed in the root folder?

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘WAMP Installation: Database works, but image links & CSS don't’ is closed to new replies.