Jump to content

Recommended Posts

Posted

Hello all,

 

I'm having a hell of a time setting up a Wordpress site. Here's the story so far:

 

I set up a Linux box on one of our virtual hosts. Everything goes fine (Ubuntu current version).

 

I install LAMP, via tasksel. All fine (barring a side-issue where the software updater refuses to work through the proxy until I abandon manual settings and go automatic).

 

I install Wordpress following these authoritative instructions. Doesn't work.

 

Uninstall Wordpress and try again with this even more authoritative guide. It works!

 

I nip back to my desktop Windows PC to see it, going to http://(IP Address)/wordpress. All I see is a text version of the site.

 

Googling hints that it's something to do with the hostname and site name and the config of either Apache or Wordpress (or both). This is from 'Settings - General' in the wp-admin console (which is only accessible from the linux server).

 

Both 'Wordpress Address (URL)' and 'Site Address (URL)' are currently 'localhost' per the instructions, though I'm pretty sure this can't be right for a production server. I have no idea what they're supposed to be. We do know what the domain of the site is, but it's not live yet.

 

Both of these computers (Linux server and my Windows desktop) are on the school network behind a Smoothwall box.

 

All advice welcome, warm fuzzy feelings in response.

Posted

We had a very similar issue on our website, it turned out there was a permission fault on our /var/www/ folder. try 777 see if it picks up if it does slowly drag it back 755 so on so forth.

 

Aso installing Webmin is a huge help just to make sure your file paths are correct.

Posted

Thanks guys, still no luck. I've changed the 'Site Address' in Wordpress Admin to the IP of the host, and also changed 'localhost' to the IP in WP-config.php (define DB_HOST). Now the outside computer reports 'Error establishing a database connection'. This site has some guidance but none seems relevant or has worked.

 

This is what I hate about Linux - when things don't go according to the guide, then you're basically stuffed unless you are (or can talk to) a long-bearded guru who wouldn't have needed the guide in the first place!

Posted
Some success! Re-installed using the second guide mentioned above, after deleting all the existing Wordpress folders (incidentally, I just noticed I mis-typed it as 'Worpdress' in the thread title and nobody noticed!). Made sure the wp-config DB_NAME was the same as the DB in phpmyadmin rather than just 'wordpress'. And the host was changed to '127.0.0.1'. Then, when I got to the web-based settings in the dashboard, I changed BOTH Wordpress URL and Site URL to the computer's IP. Hey Presto! it looks fine from my Windows PC. Now we just have to make sure it stays that way while we sort out DNS to point at the right server through the firewall and probably change the site name to reflect the proper title...Easy...*stares into distance, left eye twitches*
Posted

Some different help needed now - hope there are some Apache gurus out there.

 

So, we've got our domain name and the DNS is all set up. After following the aforementioned guide, which involved writing a new file '/etc/apache2/sites-available/wordpress' which set up the site as '/blog', this now results in you having to type out ourdomainname.co.uk/blog to see the Wordpress site. Obviously what we want is for just domainname.co.uk to go straight to Wordpress, but there is no obvious way to change it for someone new to Apache.

 

A lot of Googling shows that either a .htaccess file needs to be created with the right DirectoryIndex setting, though no clue as to where to put it (/var/www/wordpress seems the most likely, but surely Apache won't even be looking there for a .htaccess file), or some as-yet unknown change to the sites-available details.

 

Thanks for your continued help, we're almost there!

Posted
I think you would need to use an .htaccess with a re-write rule, this would need to be in the document root of the webserver (typically /var/www these days) and would re-write http://www.dom.com as http://www.dom.com/wordpress. Personally if that is all the webserver is doing, I'd either just put the wordpress install into the web root or change the web root to point to the root of the wordpress install (preference would be for the latter).
  • Thanks 1
Posted
Thanks! So does that mean I can simply edit '/etc/apache2/sites-available/default' and change all instances of '/var/www' to '/var/www/wordpress', or is there more to it than that?
Posted
Thanks! So does that mean I can simply edit '/etc/apache2/sites-available/default' and change all instances of '/var/www' to '/var/www/wordpress', or is there more to it than that?

 

That should work provided your site is using relative URL's and is happy with the base url (both things you will need to deal with in the wordpress install/config rather than apache). Obviously keep a backup of the config files!

  • Thanks 1
Posted
Thanks again, pcstru, that worked for me. Now I'm the school Linux guy, I'll have to grow a beard and wear sandals.

 

Ha! I've found Ubuntu server (that's sans any GUI) to be good and the documentation is useable and useful for basic server type tasks. I only have a small goat-beard, no sandals ... yet.

Posted
Just an update to say it's all working now. There's a LOT of config to delve through in Ubuntu after installing Wordpress! Got to change ownership of the Wordpress folders, permissions, create an htaccess file, do all the mod-rewrite stuff...Not nearly as straightforward as Ubuntu/Wordpress sites would have you believe. 5-minute setup my arse.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...