Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

How to Fix Broken Links in Local Installation of roots ualib

Jared Cleghorn edited this page Feb 14, 2019 · 1 revision

How to Fix Broken Links in Local Installation of roots-ualib

This guide details the process of configuring a local virtual host for roots-ualib. This guide assumes that you have already installed roots-ualib according to the instructions on the 0. Quick Start page of the wiki, and that you are using version 5.0.3-2 of WordPress.

  1. Add the following entry to your hosts file, replacing lib.ua.edu.local with whatever URL you would like to use to access the local site:

    127.0.0.1 lib.ua.edu.local

    If you are using Windows, the hosts file may be located in the C:\Windows\System32\Drivers\etc directory. This entry causes any requests to lib.ua.edu.local (or whatever URL you chose) to be directed to your local computer.

  2. Add the following line to C:\Bitnami\wordpress-5.0.3-2\apache2\conf\bitnami\bitnami-apps-vhosts.conf:

    Include "C:\Bitnami\wordpress-5.0.3-2\apps\wordpress\conf\httpd-vhosts.conf"
  3. Replace the contents of C:\Bitnami\wordpress-5.0.3-2\apps\wordpress\conf\httpd-vhosts.conf with the following virtual host configuration, replacing lib.ua.edu.local with the URL that you chose in step 1:

    <VirtualHost *:80>
        ServerName lib.ua.edu.local
        ServerAlias www.lib.ua.edu.local
        DocumentRoot "C:\Bitnami\wordpress-5.0.3-2/apps/wordpress/htdocs"
    
        Include "C:\Bitnami\wordpress-5.0.3-2/apps/wordpress/conf/httpd-app.conf"
    </VirtualHost>
  4. In C:\Bitnami\wordpress-5.0.3-2\apps\wordpress\htdocs\wp-config.php, change the lines

    $_SERVER['HTTP_HOST'] = 'localhost';

    and

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

    to

    $_SERVER['HTTP_HOST'] = 'lib.ua.edu.local';

    and

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

    respectively, once again replacing lib.ua.edu.local with the URL that you chose in step 1.