Skip to content

How to configure the LightSail Wordpress blog to be reached at domainname/blog?

0

Now i have set up my blog at https://blog.chatslide.ai, but i want it to be available at https://app.chatslide.ai/blog. I have done it through a rewrite of my next js app. But it still thinks itself as https://blog.chatslide.ai. Is there a way to update it?

asked 2 years ago200 views

1 Answer
1

To configure your WordPress blog on Lightsail to be reached at domainname/blog instead of a subdomain, you'll need to make some changes to your WordPress configuration and potentially your web server settings. Here's how you can approach this:

  1. First, you'll need to update your WordPress site URL and home URL settings. You can do this through the WordPress admin panel or by directly editing the wp-config.php file. Set both URLs to https://app.chatslide.ai/blog.

  2. Next, you'll need to update your .htaccess file (if using Apache) or your Nginx configuration (if using Nginx) to properly handle requests for the /blog subdirectory.

  3. You may also need to update internal links within your WordPress content to reflect the new URL structure.

  4. If you're using a Next.js app as a front-end, ensure that it's properly configured to proxy requests to /blog to your WordPress installation.

  5. After making these changes, you should clear your WordPress cache and potentially your browser cache to ensure the changes take effect.

  6. You might also need to update any hardcoded URLs in your theme or plugin files.

It's important to note that changing the URL structure of an existing WordPress site can be complex and may have SEO implications. Be sure to set up proper redirects from the old URLs to the new ones to maintain any existing search engine rankings and user bookmarks.

If you're experiencing issues where WordPress still thinks it's at https://blog.chatslide.ai even after making these changes, you may need to check for hardcoded URLs in your database. You can use a search and replace plugin or SQL queries to update these URLs throughout your WordPress database.

Remember to back up your site before making any significant changes, and consider testing in a staging environment first if possible.

Sources
Add blogs as subdomains to your WordPress Multisite on Lightsail - Amazon Lightsail
how to add a subdomain to a LIghtsail instance | AWS re:Post

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.