WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Installing WP on Sub-Domain, missing images (3 posts)

  1. Cascus
    Member
    Posted 1 year ago #

    Hi,
    I recently moved a WP install with Duplicator plugin from my domain to the clients domain, on a sub-domain. The Client already has a root install of WP they are using. When I moved the site over everything works great, admin access, pages exist, CSS in right place, all is good except the images. I had to add the sub-domain name to the start of the image url. So the site is http://www.dramanotebook.com/newsite/ and I had to add /newsite/ in front of wp-content to get it to work. So instead of /wp-content/ it is now /newsite/wp-content/. Do you know what would cause this? Is it the .htaccess file or wp-config file usually? Anyone run into this before?

    My .htaccess in the sub-domain shows the RewriteBase as /newsite/ if that helps.

    Thanks,
    Jim

  2. Cascus
    Member
    Posted 1 year ago #

    Just thought I would ping again as I didn't see any answer to this. I appreciate any help or advice, or even if there is a known posting somewhere the addresses this type of scenario.

    Thanks,
    Jim

  3. Cascus
    Member
    Posted 1 year ago #

    Here is my .htaccess file for the sub-domain install. Remember that I created the DB and user manually, and linked them in the MySQL admin. Everything is working great, just need to figure out two things:

    1) why does the link newsite.dramanotebook.com point to dramanotebook.com/newsite? How/what do I change to make it link to the sub-domain? I am hoping this does not cause issues when I redirect the main domain name to the sub-domain.

    2) Why do I have to hard code the sub-domain in the URL for images, in my pages I create, before the /wp-content/? The Header image does fine in CSS, but in the "pages" I create and link to an image makes me now input the /newsite/ sub-domain in front of the /wp-content/.

    HTACCESS:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /newsite/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /newsite/index.php [L]
    </IfModule>

    <Files 403.shtml>
    order allow,deny
    allow from all
    </Files>

    # END WordPress

Topic Closed

This topic has been closed to new replies.

About this Topic