In this first part of How To Install WordPress on Ubuntu, I'm going to show some of the things you need to do to prepare your system for the actual WordPress installation. I'll cover the steps of installing WordPress itself in Part 2.
Install LAMP
LAMP stands for Linux, Apache, MySQL, php. This is the basic web server setup you need to host a website. Even though you won't be hosting the site out to the internet, you'll need to have LAMP installed and configured to run WordPress on your computer. This tutorial assumes that you already have Ubuntu installed. Then, install LAMP on Ubuntu.
Configure Apache websites
Once you have LAMP installed and configured, you may want to set up your website to run from a directory under your user ID instead of /var/www. This can be done with some basic Apache http server configuration.
Change Apache run user and run group
In order for the WordPress automatic update function to work, the username running WordPress must match the username running Apache. You can change the Apache username by editing some parameters in the /etc/apache2/envvars file. Hit <Alt><F2> on your keyboard and enter the command
In the text editor that comes up, change the following two lines
export APACHE_RUN_GROUP=www-data
and replace www-data with your user ID and default group (your default group most likely has the same name as your user ID. For my case, this would be linerd and linerd.) Save the file and restart Apache with
If you get an error like "apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for localhost," you can fix it with this command.
echo "ServerName localhost" | sudo tee /etc/apache2/conf.d/fqdn
Then reload Apache and the error should be gone.
If you end up having trouble with phpMyAdmin, then you need to add your ID to the www-data group.
Continue on to How To Install WordPress on Ubuntu: Part 2
#
By the way, what I did to get to the adminmyphp dashboard is (found on https://help.ubuntu.com/community/phpMyAdmin):
Then I used the username "root" to log back in.
#
*phpmyadmin
#
sudo chown -R USERNAME /etc/phpmyadmin
#
Okay. Another snag for me. Before I edit envvars, http://localhost/phpmyadmin/ works. After editing for my id and group, it does not. Restoring to www-data fixes this. Any insight to what I may be doing wrong?
#
It looks like you need to add your userID to the www-data group. I had done that as I was trying to get WordPress to work properly and forgotten about it after I made the change to envvars. So make the change to /etc/apache2/envvars as shown in the post. Then add your usedID to the www-data group. You can do this through the menus from System→Administration→Users and Groups, or from the terminal with:
Then restart Apache with
Thanks for helping to debug my blog post! Looks like I have an update to make.
#
tried doing this still cant acces popmyadmin unless i change id and group back to www-data
#
I did this but phpmyadmin is not responding when I enter my username and password, it just resets the log in screen
any thoughts will be much appreciated
#
Try clearing your browser cache. If that doesn't do it, then you may be able to reset your password with
Restart mySQL with
And then restart Apache with
Finally, clear your browser cache again and give it another try.
#
Thanks Linerd, i tried this and the blue configuration screens come up etc but I'm not asked to change or set the password, tried clearing cache and restarting Apache anyway though but no luck.
#
Just to be sure, you're trying to log in as root, correct?
To reset the root password, try
The first screen should ask if you want to reinstall the database for phpmyadmin. Say "Yes". The next screen will ask you for a password for the administrative account (root). Enter the password you want, tab to OK and hit Enter. The next screen will ask about web server configuration. Make sure "apache2" is selected with a * (highlight and hit the space bar if it's not marked). Then OK.
Then clear your browser cache and see if you can get in. If that doesn't work, I'm stumped.
#
Thanks Linerd!
It's all working now, ended up reinstalling phpmyadmin and clearing cache etc again as you suggested.
Thanks for the guides, they're really great, especially for newbies like me!
#
#