Tuesday, January 29, 2019

software installation - How do I install WordPress.org?


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.



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.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...