0

I learnt recently that the WordPress software in the Software Centre is WordPress.com, I want WordPress.org as it's more feature-full. I have downloaded the zip file and extracted its contents but it's all in PHP format. I looked at the readme file and it said to open the php install file in my web browser (which for me is Google Chrome) but whenever I do this it just re-downloads this file in the /home/fusion809/Downloads folder.

It says in the readme:

If for some reason this doesn’t work, don’t worry. It doesn’t work on all web hosts. 
Open up wp-config-sample.php with a text editor like WordPad or similar and fill in your database connection details.
Save the file as wp-config.php and upload it.
Open wp-admin/install.php in your browser.

I have no idea how to fill in the database connection details.

9
  • Look at this How To Install Wordpress on Ubuntu 14.04
    – TuKsn
    May 24, 2014 at 13:50
  • When I ran CREATE USER wordpressuser@localhost IDENTIFIED BY 'password'; in mySQL I got this output: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p CREATE USER wordpressuser@localhost IDENTIFIED BY 'password'' at line 1
    – Josh Pinto
    May 24, 2014 at 14:06
  • I also got an error in the previous line: ` CREATE DATABASE wordpress;` too: ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'mysql -u root -p CREATE DATABASE wordpress' at line 1
    – Josh Pinto
    May 24, 2014 at 14:08
  • I'm a total noob when it comes to these things so I need better explanations (step-by-step command-line instructions would be helpful) than this one you showed me.
    – Josh Pinto
    May 24, 2014 at 14:10
  • 1
    You use a wrong password! Did you follow this before installing wordpress How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 14.04 ?
    – TuKsn
    May 24, 2014 at 14:28

1 Answer 1

1

I can't comment at the moment, but in simple terms, the main focus here should be to fix the mysql password, sudo service mysql stop, run the command nano password to invoke the nano editor, paste the following text substituting with the new password

    UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root';
    FLUSH PRIVILEGES;

Then save the file (CTRL-X, save the file), now start mysqld with the created file

    sudo mysqld --initfile=`pwd`/password

this will reset the mysql password, you may want to run sudo killall mysqld; sudo service mysql start

I'd then suggest using https://help.ubuntu.com/community/WordPress in order to install wordpress. It isn't a production ready environment, but will suffice for testing.

carry on if you actually want a "proper" install; We are now going to start the installing process. I'm going to assume that you're running ubuntu 14.04, and that you have nothing else on your webserver. (earlier versions will probably be the exact same, however replace /var/www/html with /var/www)

sudo -s This will run all commands as root, be wary of what you type!

okay, first we need mod_rewrite, apache2 comes bundled with it, however it is disabled by default!

a2enmod rewrite; service apache2 restart;

next, cd into the web root folder cd /var/www/html

wget http://wordpress.org/latest.tar.gz tar -vxaf latest.tar.gz mv wordpress/* ./ rmdir wordpress

We've just downloaded all of the relevant files required, and moved them into the correct place, next let's allow www-data (the user account for the web-server to modify files)

chown -R www-data:www-data ./

Next, let's allow .htaccess files, nano /etc/apache2/sites-enabled/000-default.conf and change the AllowOverride line to read Allowoverride All.

you should then be able to login to your webserver and setup the wordpress install.

5
  • How and where do I create the text file? If you can't comment then just edit your answer accordingly.
    – Josh Pinto
    May 24, 2014 at 17:16
  • Just create the text file in your current directory, that should work. pwd is used to get the current working directory, and thus shouldn't matter where the file is, as long as you run the commmand to start mysqld in the same directory as you created the file in. May 24, 2014 at 17:24
  • So is the nano password part of the text file? If so I'd like to suggest you edit it accordingly, as the way it is now it's a little confusing.
    – Josh Pinto
    May 24, 2014 at 18:08
  • This what output I get from mysqld line 140525 4:10:21 [Warning] Using unique option prefix key_buffer instead of key_buffer_size is deprecated and will be removed in a future release. Please use the full name instead. 140525 4:10:21 [Warning] Can't create test file /var/lib/mysql/fusion809-Vostro-3500.lower-test 140525 4:10:21 [Warning] Can't create test file /var/lib/mysql/fusion809-Vostro-3500.lower-test mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 13) 140525 4:10:21 [ERROR] Aborting 140525 4:10:21 [Note] mysqld: Shutdown complete
    – Josh Pinto
    May 24, 2014 at 18:11
  • nano password was the command to invoke nano with the correct filename. You may have to run the mysqld command as root (just prepend sudo to the command) May 24, 2014 at 19:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .