I've just installed Wordpress from my cPanel with Hostgator and this is my dilemma:
My static html site was hosted here at www.mydomain.com and I installed Wordpress in same path. I am able to login into my dashboard and activate new themes but when I click visit website that takes me to same html version and not my Wordpress site. How do I configure my site so that instead of loading my old html site it, it will take me to WordPress site instead. if I remove files for html site, will it automatically render my new WordPress site or do I need to do extra configuration for this to happen?
Your static html site probably has an index.html file, and your WordPress install has an index.php script. Since you installed WordPress in the same folder as your static site both will now exist in the same folder.
The default configuration for Apache is when you browse to the doc root or a directory Apache will look for index.html first and if not found then look for index.php
DirectoryIndex index.html index.php
In your case index.html is found and served.
If you remove or rename index.html you should see your WordPress install since Apache will then look for index.php.
Change the Name of the old file or if you are not going to use it.Just get rid of it.
Related
I have an installed WordPress website.
I'm working on the site, therefore, I want to show a constructor page for the internet user. I have created a page which called first.html and I change the .htaccess file like below
#Alternate default index page
DirectoryIndex first.html
Now when I enter my domain name on the browser I can see the first.html. This is working properly.
I'd like to see my changes by entering the domain and page name on the browser like
www.mydomain/index.php
or
www.mydomain/wp-content/themes/XXXTHEME/index.php
However, my theme pages don't work.
How can I achieve to do this?
Instead of making changes in .htaccess, I'd suggest you to use this plugin : https://wordpress.org/plugins/maintenance/
Simply name your html file "index.html"
Web servers most commonly parse the index.html file firstly (unless told otherwise) and if it is not found, it proceeds to index.php
This also allows you to simply change that ".html" part to ".php" to see the website you are working on, without installing plugins that clutter your database or making unnecessary changes to your .htaccess file.
I am trying to use wordpress in conjunction with my static site. The wordpress page will just be the gallery. I have wordpress installed in the root dir of my site to prevent an extra subfolder in the link (site.com/wp/page).
I am trying to my index page as the static on which isn't using wordpress so what I tried doing was changing the directoryindex file in the .htaccess but obviously didn't work because wordpress uses index.php to launch the wordpress environment.
Does anyone know any work around for this? It would be greatly appreciated.
Add this to your .htaccess file :
DirectoryIndex mynewindex.php
this will set your main directory index to be mynewindex.php so change it to what ever index page you want .
#GANIZ
Here is a way to help you achieve what you want. You can create a subdomain ex. gallery.example.com and point it to the new directory you have created in root dir.
This should make it publicly available. Then the simplest form of importing a page from the wordpress installation is with an HTML iframe . Also note that Wordpress requires a MYSQL database.
I've installed Joomla (running on Ubuntu 14.04) according to the default installation guidelines. My problem is that now when I navigate to my domain (insertdomainhere.com) what shows up isn't my Joomla home, but the apache default page. At the moment I have to navigate to insertdomainhere.com/joomla to view my Joomla page. What I'd like to do is set it so that when I navigate to insertdomainhere.com my Joomla page appears (as opposed to .com/joomla).
Any and all help is greatly appreciated.
Cheers,
Ryan
what shows up isn't my Joomla home, but the apache default page.
This is because you've uploaded Joomla! in /joomla and not in the default directory (/var/www/html). This would result in Apache showing the default page.
What I'd like to do is set it so that when I navigate to insertdomainhere.com my Joomla page appears (as opposed to .com/joomla).
You should move your Joomla! installation to the root directory of your web server or put this in an .htaccess file in the root directory:
Redirect 301 / /joomla
You can use the following to redirect your root folder to /joomla/:
RedirectMatch ^/$ /joomla/
I'm using FileZilla to put Wordpress on my website.
This Website already existed and already had some pages in it, and it does a backup everyday.
Unfortunately I can't delete index.html on the backup folder, so even if I use Wordpress to edit themes et cetera, THAT index.html is shown when i go visit the web site.
In the Wordpress folders there isn't a index.html file, only a index.php file, is it normal?
Yes, this is normal because Wordpress uses PHP for dynamic pages.
You can add this to your htaccess to prefer .php over .html
DirectoryIndex index.php index.html
Or set your wordpress Site in a sub directory of your regular site.
Recently I've been working to develop a multi-user Wordpress site with Wordpress 3.0 however at the moment we are iso.g one server to showcase preview static content in a subdirectory while multi WP is in the root directory.
My question however is how to keep the root directory hidden from the publc. Curntly I have a PHP index file handling he redirect howevwer as WP has its own index file I waned to ask about any possible alternatives.
Thanks very much for any assistance,
You're probably going to want to do it with an .htaccess file. However, Wordpress has one of those too, so rename the current .htaccess file to .htaccess.orig (or whatever you want... but don't delete it) and then create your new .htaccess file with your 301 redirect.
Then whenever you are done, just rename everything back to the way it was.