How can I make www.mywebsite.com/blog? - wordpress

I have my website(HTML files) in a google cloud instance.
(ex: www.mywbsite.com)
To start the blog, installed Wordpress using google cloud one-click installation at another instance, which is working fine, but to access it, I use an Ip address (different from the main website).
So, on one hand, I have the site, and at another have I have the Blog IP.
How can I merge these two things to achieve the following result?
To this:
www.mywebsite.com/blog (same instance or some link to the second)
From this:
www.mywbsite.com (instance 1) + WP Blog IP (instance 2)
If you can point me some links/tutorials to better understand and solve this, I would be appreciated.
Have to tell you I am a very inexperienced tech guy, but eagerly trying to learn.
Thanks

If you want to use like subdirectory, it has to be in your instance-1 or you can use .htaccess and redirect to your instance-2.
However, if you use like this, you can't do what you want because Apache will rewrite address again and it will see www.instance-2.com.
I hope, it will answer your question; otherwise, let me know. I will update the answer.
Edit 1 - Add links
Usage of .htaccess for redirect
Redirect and Rewrite URLs with .htaccess
Thank you.

You should install Wordpress in a subdirectory instead of using cloud launcher and having it on another server. It's really easy to install WordPress manually. This is my favorite guide for any Debian based situation, not just rpi. Also this is the guide on the WordPress Codex. Just install it to the /blog subdirectory.

Related

WordPress website not working with domain name but IP address

http://sidparmar.ca/portfolio/ This is my portfolio website and an only home page is working with the domain name. Every link is broken unless replaced by IP of my VPS which is 64.20.53.42.
So usually it should work like sidparmar.ca/portfolio/contact/ (give me an error "The requested URL /portfolio/resume/ was not found on this server.")
but currently, it is only working if I type 64.20.53.42/portfolio/contact/ as URL.
Please let me know if you have any suggestions/advice or pointer that I should look into. Any help is appreciated.
Has your site been like this since you installed Wordpress? If so, then where did you install wordpress (i.e. what directory)? It looks like you did not install it in the web root directory of your web server. Also, when you installed Wordpress, are you sure you specified the correct URL of your website?
My suggestion based on the limited information you provided and the minor amount of custom content of your website is to simply delete your database and files, create a new database, and re-installation Wordpress following exactly the correct instructions. Your VPS host may have an outlined process for you.
Alternatively, if this is a new issue, do you think you caused it? If so, what did you do? If not, you should probably contact your VPS host to see if you or they need to make an update in your DNS settings.
Found the answer by myself! Yeah!
I just added "ServerAlias www.domainname.ca" to my apache2 conf file (000-default.conf) which you can probably find at /etc/apache2/sites-available directory in your VPS.
Not sure why this worked or what exactly caused the problem but I am sure that it happened because of Yoast SEO plugin.

404 not found error on WordPress local host on wpn-xm

I am trying to develop a WordPress site on my local host. i am using wpn-xm as a local server. but after change my permalink from plain to post name, all the pages redirect to 404 error page.
can anyone please tell me, how can i solve this problem?
Thank You
It seems like with WPN-XM, you have to manually add the rewrite rules yourself (since it doesn't have mod_rewrite available). Instructions on this can be found here:
http://nginxlibrary.com/wordpress-permalinks/
You will need to setup Nginx specific rewrite rules, because WordPress cannot do that automatically for you. Instructions you can find on wordpress.org or nginx.com.
The WPN-XM project has a folder with a lot of Nginx configs available, see
https://github.com/WPN-XM/software/tree/master/nginx/config/conf/sites-disabled
You are looking for Wordpress:
https://github.com/WPN-XM/software/blob/master/nginx/config/conf/sites-disabled/wordpress.conf
adjust the wordpress location
Here it's www/wordpress, but yours might be www\my_wordpress-1.2.3 or something else
make sure the file gets included in the nginx.conf

wordpress permalinks with prefix for wildcard

I'm having trouble trying to program into Wordpress a wildcard for the permalink structure. So for example, I'm trying to setup a permalink where the link is like this: foo.example.com/company. At the moment, the wildcard is in place for the URL (foo.example.com), but the permalinks are still under the root (example.com/company). Is there a way to program it so that the permalink will be matched exactly to the URL that is written. So if I entered in dsdd.example.com, the permalinks will display dsdd.example.com/company, etcc...
This kind of thing is way over my head, so if someone could provide some code examples of how to accomplish this, it would be much appreciated. Thank you.
I'm not sure what your current setup is, but I can offer advice based on my prior experience with web hosts and WordPress.
If you want to have something where the subdomain (something.example.com) is a wildcard (thiscouldbeanything.example.com) and still point to your WordPress installation, you're going to have to get your host to set up something called a Wildcard DNS Record
From your description, you might have this set up already. If so, cool.
Using the wildcard is another story. Personally, I would go with a .htaccess file, and use mod_rewrite in order to have it use the wildcard subdomain to be used in the URL.
WordPress MU (Multi User) uses something along these lines to help you set up a subdomain network, and you can probably use their .htaccess file demonstrated here
Without REALLY specific information about your setup and goals, I couldn't be as much help as I wanted to be, but good luck!

Should I install a new wordpress to make this happen?

I have a wordpress website called http://mysite.com (example only), I want to have a link http://blog.mysite.com, how would I configure that one using only one wordpress install(same wordpress install on http://mysite.com) and of course the same database that the http://mysite.com uses. Should I just use a plugin or what?
If you want to use 1 wordpress install for two different sites try using http://wordpress.org/support/forum/multisite .
Otherwise, I would agree with the answer above and you would only need to setup a simple redirect in your hosting control panel.
Add a subdomain of a kind http://blog.mysite.com pointing to a location similar to http://mysite.com. In this way both the domains will point to the same wordpress installation.

How do I map custom domains to my sites on a multisite Wordpress installation?

I just upgraded one of my many blogs to Wordpress 3.0 and I was glad to see that I now should be able to run all my blogs from a central installation.
I have the multisite stuff configured and up and running, and can create new blogs as I wish.
My host is set up to handle wildcard subdomains, but I'd like to map my already existing, proper domains to sites instead. How do I do this?
Redirecting the domains is not an option.
There's a domain mapping plugin:
http://wordpress.org/extend/plugins/wordpress-mu-domain-mapping/
If you download the dev version, that will work with 3.0, I'm told:
http://plugins.trac.wordpress.org/browser/wordpress-mu-domain-mapping/trunk/
There should be a download link at the bottom of that page.
Modrewrite is probably the answer, but without knowing more about the server and how wordpress is doing the multiple blog feature (I use it and have upgraded to 3 as well, but i haven't looked at it very closely), it's hard to give a specific answer.

Resources