WordPress.org

Ready to get started?Download WordPress

Forums

WAMP Installation: Database works, but image links & CSS don't (14 posts)

  1. CallUp
    Member
    Posted 1 year ago #

    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:

    define('WP_HOME','http://localhost/mySite');
    define('WP_SITEURL','http://localhost/mySite');

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

    Does anyone have any ideas?

  2. CallUp
    Member
    Posted 1 year ago #

    BTW, I also tried adding this to the functions.php file of Theme:

    update_option('siteurl','http://localhost/mySite');
    update_option('home','http://localhost/mySite');

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

    [No bumping, thank you.]

  3. CallUp
    Member
    Posted 1 year ago #

    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?

  4. esmi
    Forum Moderator
    Posted 1 year ago #

  5. CallUp
    Member
    Posted 1 year ago #

    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?

    Thanks.

  6. esmi
    Forum Moderator
    Posted 1 year ago #

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

  7. CallUp
    Member
    Posted 1 year ago #

    Yes, that was the first thing I did.

  8. CallUp
    Member
    Posted 1 year ago #

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

    http://localhost/mySite/wp-content/uploads/2012/11/SamSeder-e1351875152758-196x300.jpg

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

    http://localhost/wp-content/uploads/2012/11/SamSeder-e1351875152758-196x300.jpg

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

  9. CallUp
    Member
    Posted 1 year ago #

    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?

  10. CallUp
    Member
    Posted 1 year ago #

    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.

  11. CallUp
    Member
    Posted 1 year ago #

    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.

  12. esmi
    Forum Moderator
    Posted 1 year ago #

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

  13. CallUp
    Member
    Posted 1 year ago #

    esmi,
    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%/

  14. esmi
    Forum Moderator
    Posted 1 year ago #

    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?

Topic Closed

This topic has been closed to new replies.

About this Topic