Tuesday, December 6, 2022

Can I run both my wordpress website and non-wordpress website on same domain?

Here is the article. 


It's absolutely possible, yes. And there are many scenarios you can use depending on what you want to do:

  • Subdomains — install everything in different subdomains, or install one thing at the root and the others in different subdomains. The subdomains normally just map into directories on the same account, so you use the same FTP credentials and so on to transfer files.
  • Directories — like http://www.example.com/blog. Very easy to deploy a blog this way, and just put your other stuff in the root.
  • Intermingling — you can actually put files (.php, .html, etc.) in the same directory as WordPress, just as long as there are no name conflicts. The default redirection rules in .htaccess will ensure that those files will get served as usual without interfering with WordPress.

Not knowing anything about your code, if it's simple enough another approach would be to create custom page templates in WordPress that invoke your code. The nice thing about this is that your pages will always have the same look and feel as the other pages in the blog, i.e. if you change/update the theme. This may or may not matter to you.

No comments:

Post a Comment