Muti-site + Amazon EC2 + Amazon Cloudfront and no S3

Hello,

Currently, I have a test multi-site WordPress server set up with Cloudfront and no S3.

Tested ec2 domain and the site comes up fine. No issues.

Added the domain mapping plugin, added a subsite and the subsite domain works fine, but the primary blog domain does not work well. I can see the frontpage using the blog domain, but the links are pointed to the ec2 domain. I can however, manually replace the URL with the primary blog domain and the page/post will come up. Summary:

http://ec2-…compute-1.amazonaws.com works

http://mysecondaryblog.org/ works

http://myprimaryblog.org/ brings up site, but links are still pointing to http://ec2-…compute-1.amazonaws.com. I can do a db dump and replace those links, but not ideal.

wp-config.php:

define(‘DOMAIN_CURRENT_SITE’, ‘myprimaryblog.org’:wink:

define(‘PATH_CURRENT_SITE’, ‘/’:wink:;

define(‘SITE_ID_CURRENT_SITE’, 1);

define(‘BLOG_ID_CURRENT_SITE’, 1);

db:

wp_options -> siteurl is set to http://myprimaryblog.org

wp_options -> home is set to http://ec2-…compute-1.amazonaws.com

wp_site -> 1 is set to http://ec2-…compute-1.amazonaws.com with path set to /

wp_blogs -> 1 is set to ec2-…compute-1.amazonaws.com with path set to /

wp_blogs -> 2 is set to ec2-…compute-1.amazonaws.com with path set to /secondaryblog/

Thank you.

  • Sajid
    • DEV MAN’s Sidekick

    Hi knluu,

    Hope you are doing good today :slight_smile:

    In some cases, you need to change the URLs manually specially those that are hardcoded in the content or custom menu links.

    If that’s the case the you must do a find and replace in order to change the links.

    You can do this without going to DB and dumping it then find & replace by using the Better Search Replace plugin.

    Hope that helps! Feel free to post a reply if you need further assistance :slight_smile:

    Best Regards,

    Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.