The MU forums have moved to WordPress.org

Relative Pathing wrong... (2 posts)

  1. mikecroteau
    Member
    Posted 16 years ago #

    Hi there, Im very new to Wordpress, so please forgive my newbness. I am working on a project that is being powered by wordpress. Someone had originally set it up and is running out on a web server already with permalinks set and pretty urls configured.

    I downloaded the complete project and got a copy of the database to try to set up locally to make changes to layout...etc. I successfully restored and connected the instance of wordpress, however the relative or base path isnt correct for some reason.

    I checked the wp_options table, found that there was a url (example: "http://supercoolsite.com"). I replaced that with http://localhost/wordpress-instance-name. I checked the wp_config.php, I tried defining both:

    define('WP_SITEURL', 'http://' . $_SERVER['SERVER_NAME'] . '/wordpress-name');
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/wordpress-name');

    Still having problems. The css, images etc.. are not showing up correctly even though the path in the source is correct. (again, relative pathing on things <img src="/website-images/exampleimage.png">)

    What could be going on? What am I doing wrong or forgetting? I have spent the last 3 days trying new things out without much of any luck. The wordpress instance is using the Atahualpa 3.4.4 Theme if that helps.

    Thanks in advance for any help on this!

    Best
    Mike

  2. DeannaS
    Member
    Posted 16 years ago #

    WP doesn't play nicely unless you have a FQDN. So, set up a hosts file and make a local url like wordpress.localhost or localhost.wp or something.

About this Topic

  • Started 16 years ago by mikecroteau
  • Latest reply from DeannaS