I can’t understand WordPress,…
…I am trying to learn about WordPress but cannot get past the install
I would dare say you are suffering from some server configuration issues, rather than WordPress issues. How are you hosting WordPress?
1) What OS: Windows, Linux, OSX – and what version or distribution?
2) How did you install the server environment – WAMP, XAMPP, Bitnami, MAMP, or individual components, or something different?
3) If you’ve installed on a Linux distribution, how did you install WordPress – through a package manager, or by setting up the WordPress package directly in /var/www/* ?
if I post a comment and click on the preview button it looks correct, but if I click on visit site all I get is a list of the files in the wordpress directory
Is there an “index.php” file in that list, and if the answer is yes, what happens when you click on it?
]]>OSX 10.11.6
Apache 2.4.18
PHP 7.0.11
MariaDB 10.1.17
I enabled Apache on the MAC, and used Homebrew to install PHP and MariaDB
I also installed PHPMyadmin 4.6.4, manually.
Everything seems to be working… I have some PHP stuff in there that works correctly,
And the wordpress install looks like it works right. I just can’t figure it out… If it is a server issue I don’t know what. I have not found anything in my searches about that. Would like to get it working though. Thanks.
I notice that in the listing of the public folder ( localhost-index of/ ) the actual index has been taken over by wordpress…
ie, the listing now has the wordpress watermark on the page whereas before it was just the list of folders and files, similar to doing an ls in unix…
Yes there is an index.php in there, if I click on it I get the listing of files in the wordpress folder…
…the listing now has the wordpress watermark on the page whereas before it was just the list of folders and files,
So, is it displaying a list of files and folders, or is it displaying a WordPress install script? WordPress doesn’t water mark anything in an Apache directory listing.
If an index.php file is present in the web root, then your browser should automatically attempt to render it. If you installed WordPress in its own directory, when you navigate to https://localhost/wordpress/
for example. You should see an installation script like the example I linked to above. If you’ve mixed the WordPress files with other preexisting files located in the root directory, then that needs to be rectified. Files from two sites or other web projects can’t be served from the same directory.
If you can navigate to any web-accessible directory in your browser, and it displays a list of files that includes an ‘index.php’ file, then Apache probably isn’t configured to serve index.php
files. Apache should be automatically rendering that index.php file, not ignoring it and showing a directory listing instead.
Some screen shots of what I’m trying to describe…
As you can see, if I enter the URL to the site manually (localhost/wordpress/artssite)
I can successfully open the page, but there is that “opps” message there…
then once I click either dashboard, or the site admin link I am returned to the index of the wordpress folder.
Likewise, if I manually enter ‘localhost/wordpress/wp-admin/index’ I will get to the dashboard but when I click on ‘visit site’ I get the index of the wordpress folder.
if I manually enter ‘localhost/wordpress/wp-admin/index’ I will get to the dashboard but when I click on ‘visit site’ I get the index of the wordpress folder.
My best guess is that you may need to configure the Apache “DirectoryIndex” directive so that Apache knows that it is supposed to serve index.php
files by default. I’m guessing that’s probably why you get a directory listing instead of opening the index.php file automatically.
“how to” DirectoryIndex order Apache
“how to” apache “index.php instead of index.html” (Links go to Google)
Get that sorted first, then see if the 404 error persists. If so, we can address that to find out if it’s going to be a permalink/Apache mod_rewrite issue, or something different.
I’m not sure how this happened:
https://www.dropbox.com/sh/gx8blow0vti2bz1/AAC_op7MO7s3AWJi9kiWymPra?dl=0&preview=result_of_clicking_view-site+in+dashboard.png
That’s a screenshot of a combination of the directory listing for /wordpress and a partial rendering of the “readme.html” file that resides in that directory, in the same viewport. I have no clue why that would happen.
]]>Kinda sounds like that may be why this is happening. I remember setting that option when I configured the apache server to use a different document root.
I’ll post the results.
Thanks