Add custom name to base url on WordPress - wordpress

How can I add to my domain a custom name, as for example:
mydomain.com/test/
So if visit any page or post the URL will be
mydomain.com/test/...

Simplest method is to install Wordpress in a directory called /test/ relative to you webserver root.
For example, if your webserver root is /var/www/ then you can install it in /var/www/test/.
Then all of your WordPress URLs will begin with mydomain.com/test/
Alternatively, you can add rewrite rules to your webserver configuration, but that gets more complicated.

Related

Silverstripe install root folder public

I have installed silverstripe 4 into the /var/www/html folder in apache.
However, when I go to the url, I have to use "localhost/public/index.php" in order to obtain the main page. I thought I was to be able to just go to "localhost" to find the defaut page. What am I to do if I want to have a main page without people having to specify "/public/" before it?
Thanks.
Normally, your localhost website can be resolved without adding /public/ if the following 2 things are configured correctly.
Enable Apache mod_rewrite
Having .htaccess rewrite config in /var/www/html
Troubleshooting
Check if you got the right .htaccess in /var/www/html. Basically, this Apache config file will forward all the requests to /public/ folder.
If .htaccess is fine, make sure your mod_rewrite is enabled in your Apache. Check this link.

Using wordpress in a subdirectory

I use to have wordpress installed on the root of the website, but today I moved to a subdirectory "root/blog" with these steps:
1) Moved all the files>
2) Copied .htaccess and index.php do "root" and modify them
3) Change the wordpress URL on the settings.
It worked fine.
But I don't want it be accessed via www.mysite.com. I want to be access as www.mysite.com/blog. I want to do my own main index.
But if I remove the index.php from root, it gives me problems like /blog won't find my static first page.
What I'm missing?
You need to change your apache virtualhosts settings.
More infos here.

magento under wordpress as subdirectory not working

I am using godaddy server.
I have wordpress as root directory and i have setup magento from local to server inside root as subdirectory.
Magento home page is working fine,but when i try to open any supage of magento then it opens "About us" page without CSS of root wordpress.
Thanks in advance.
Have you set the RewriteBase statement in Magento .htaccess ?
#RewriteBase /magento/
become
RewriteBase /subdirectory/
If your server is configured correctly you don't need to set RewriteBase, but make sure your base url is set correctly in backend as {server-root}/subdirectory/. If you cannot access admin, you'll need to change data in core_config_data by searching fields by url and setting the correct value by for example phpMyAdmin. Otherwise you'll need to do it by ssh + mysql command... or reinstall your Magento instance giving correct url to the installer.

Bitnami Stack : accessing wordpress installation in its own directory at domain root

Please Bear With Me!!
i am using this tutorial Giving Wordpress Its Own Directory (Using a pre-existing subdirectory install part ) to launch a wordpress (installed at a sub folder called wordpress) by using example.com instead of example.com/wordpress.
Now it says that copy index.php to your root folder and change the relative path to wp-blog-header.php accordingly now by folder structure is a little complex hence i have attached a pic
Now to access site root i go to example.com(obvious)
but to access wordpress i have to go to example.com/wordpress (if anyone wondering why i am using bitnami wordpress stack AMI and thus everything came preconfigured)
now accoringly to tutorial i should copy index.php to site root from wordpress root and change relative location of wp-blog-header.php accordingly.
when index.php was in same directory the function was require('./wp-blog-header.php') . Now this location is to be changed
I have tried all three options i could think of (i guess)
1) ../apps/wordpress/htdocs/wp-blog-header.php
2)./wordpress/htdocs/wp-blog-header.php
3)wordpress/htdocs/wp-blog-header.php
Edit : its a bitmani wordpress stack ami on amazon aws and its the reason i believe there is problem in the first place.
But visiting the domain root gives server error . Any suggesstions??
Try require ( $_SERVER['DOCUMENT_ROOT'] . '/wherever/wp-blog-header.php/is/located and it should find it.
Here is the answer http://wiki.bitnami.org/Components/Apache#How_to_change_the_URL.3f
it was because of bitnami and not a fault of wordpress

Redirect a wordpress site

I've installed my wordpress site in a folder and now I only can reach it via: [domainname]/wordpress.
Is it possible to redirect my site to [domainname]?
Yes it is possible and can be done in two steps:
Change Site Address Option
Modify index.php
Details: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory on the paragraph Using a pre-existing subdirectory install
Move Wordpress to your webroot:
http://codex.wordpress.org/Moving_WordPress#On_Your_Existing_Server

Resources