mariachi
Member
Posted 11 months ago #
Hi All,
It's my first time installing wordpress and i was just wondering how i get wordpress to work in the following scenario:
I have a general site that i want to keep in the root. WordPress is in a subfolder and does not have to be linked in any way to the root-nonwordpress-site. But without me putting and wordpress index.php in the root the site won't work. It's actually showing data and text from my root-nonwordpress-site.
I've seen a lot of info on moving the install, installing several versions of wordpress or putting it in a subfolder (while still working from the root) But i haven't really found my anwser.
Thanks a lot in advance!
Do you have an .htaccess file in your domain's root folder? Are you using a *nix or Windows server?
mariachi
Member
Posted 11 months ago #
its on a Linux server and yes there's a .htacces file in the root. But it's currently not doing anything for my wordpress installation. Its used by my root-site
It may still affect your WordPress site. What's in it? If it is more than 10 lines, please use a pastebin.
Solomonc
Member
Posted 11 months ago #
The easiest way to install WordPress is to use the Fantastico application in the cPanel (if you have one). In the installation screen, all you need to do is to indicate the name (e.g. blog) of the directory in the "Install in Directory" field that you want to install your WordPress. Once done, the Fantastico application will take care of everything. Note: If you leave this field blank, WordPress will be installed in the root directory.
If you want to use the Fantastico method, you should delete your existing WordPress install files (in your sub-directory) using your FTP program. The existing database that you have created can be deleted later as Fantastico will create a new database for you.
mariachi
Member
Posted 11 months ago #
that would be:
AddHandler x-httpd-php5 .php
RewriteEngine on
RewriteRule ^([^/\.]+)/?$ /index.php?url=$1 [L]
AddType video/ogg .ogv
AddType video/mp4 .mp4
AddType video/webm .webm
Try adding
DirectoryIndex index.php index.html index.htm
to the that file.
mariachi
Member
Posted 11 months ago #
thanks Solomonc, i'm afraid there is no fantastico app on my cpanel though. And i'm quite interested in knowing how this seemingly simple task would be done.
@sdmi : I did notice that when i remove the RewriteEngine part wordpress doesnt load all the info from the root-site anymore. But i don't understand why if i put the line echo "tis is a test"; in the wordpress/index.php file and then go to the wordpressfolder with my browser and look up wordpress/index.php. It doesnt show that text. even if i comment everything else out. And there's no .htacces file in the wordpress folder that could be interfering..
The easiest way to install WordPress is to use the Fantastico application in the cPanel (if you have one)
It's also one of the easiest ways to have a munged WordPress installation. Generally speaking, we don't recommend using 1-click installers if they can possibly be avoided.
mjmund
Member
Posted 11 months ago #
i am having a somewhat similar issue. i installed wordpress into root/blog and the mainpage/homepage/frontpage of the blog seemed to display ok. so i made a sample post and when i clicked on "view post" i got a 404 error. i checked the /blog folder and it had index.php and .htaccess but the root directory only had .htaccess so i copied (not moved) the index.php from the /blog into the root. now when i make a sample post, and click on "view post" it comes up just fine, however back on my main/home/front it does not show my new post or any posts. any suggestions? am i missing another file in the root ?
mariachi
Member
Posted 11 months ago #
Didn't do anything.
Btw if this helps:
My site is: http://www.das-lab.nl/
Wordpress is installed in: http://www.das-lab.nl/wordpress/
thanks for the help so far!
mjmund
Member
Posted 11 months ago #
btw, my site is http://www.4ever2weeksandaday.com and wordpress is located same place plus /blog
brand new to this - so try not to be too harsh on me
@mjmund: It is impolite and contrary to forum policy to interrupt another poster's ongoing thread with a question of your own. Please post your own topic.
@mariachi: Can you login to WordPress OK? what are you using to run the root site?
mjmund
Member
Posted 11 months ago #
very sorry about that - i am new to this.
made new post - tks
mariachi
Member
Posted 11 months ago #
A custom cms that i build myself run on a different database. And i can login to wordpress just fine. insert and adjust posts and everything. Even tried activating the current theme and downloaded another theme just for the sake of trying something.
My best guess would be that something in the custom CMS is rewriting urls - thus creating a problem in WordPress.
mariachi
Member
Posted 11 months ago #
With .htacces you mean?
And doesnt wordpress need his own index.php in the root? Or should it just work like this?
With .htacces you mean?
Yep. Any rewrite rules in the root folder could be redirecting page requests well before they get to WordPress.
mjmund
Member
Posted 11 months ago #
sorry - just a post to discontinue following the thread via email
mariachi
Member
Posted 11 months ago #
ah wel in that case it shouldn't be the .htacces. I've delete any reweriting (wasn't usijng it anyways) and commented all .htacces rules to test. Still no luck. I think i'll download a new wp install and try it on a empty server.
thanks for the info
mariachi
Member
Posted 11 months ago #
tried a new 3.4 install on a empty server and that worked just fine.
Gues i'll never know what went wrong with the 3.2.2 version,
cheers