• Hello all, finished a blog I was working on for over 20 hours, my fellow employee told me I should change the root directory from “/omarblog” to just “blog”, which made a lot of sense.

    However, I went into the dashboard and changed it from /omarblog to /blog, and also renamed the folder in the directory to blog.

    Now, I cannot access the dashboard (boots me to index of the site, omarcoffee.com, and when I go to https://www.omarcoffee.com/blog/, I see the site with no CSS.

    Anyone help me here? I originally had problems accessing the blog via URL, it kept kicking me to index, so I posted here and someone gave me a .htaccess file that corrected the problem. I don’t have much experience with .htaccess files so this could easily be the problem but I’m unsure.

    The .htaccess that corrected it in the beginning is the following:

    DirectoryIndex index.php index.html
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress

    If I remove the file, it will kick me to the index every time I try to access, https://www.omarcoffee.com/blog.

    Extremely worried I ruined the blog and need to redo everything, if you have any ideas please help me out!

    Thanks,
    Mike.

Viewing 3 replies - 1 through 3 (of 3 total)
  • First things first: In the source, your CSS file is linked to the old URL. You should check in header.php to see if the CSS file link is hard-coded or if it is linked using either bloginfo('template_directory'), bloginfo('template_url') or bloginfo('stylesheet_url'). If not, I suggest referencing the bloginfo Codex page.

    If you have access to phpmyadmin, go into your database’s wp_options table and double check the values in the home and siteurl fields.

    If you still have access to your dashboard, check the url settings there and regenerate your permalink settings.

    Helpful links:

    Thread Starter roy360

    (@roy360)

    Checking out those posts you linked now.
    FYI: I do NOT have access to the dashboard and the CSS file link is hard coded as: <?php bloginfo( ‘stylesheet_url’ ); ?>, so don’t see a problem there.

    Going to attempt to change my functions file to edit the URL.

    Thread Starter roy360

    (@roy360)

    Updating functions.php with:
    update_option(‘siteurl’,’https://example.com/blog&#8217;);
    update_option(‘home’,’https://example.com/blog&#8217;);

    worked, thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changed Root Directory – Messed everything up’ is closed to new replies.