How to install second local wordpress site on LAMP?

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
SamLearnsLinux

How to install second local wordpress site on LAMP?

Post by SamLearnsLinux »

Hi. I installed LAMP stack and my first site on wordpress using this video and these instructions shown inside it.
Step 1: Update the System
#apt-get update

Step 2: Install LAMP Server
#apt-get install lamp-server^

Step 3: Wordpress Database Initialization
#mysql -u root -p

Commands
CREATE DATABASE wordpressdb;
CREATE USER wordpressuser@localhost IDENTIFIED BY 'wordpresspassword';
GRANT ALL PRIVILEGES ON wordpressdb.* TO wordpressuser@localhost;
FLUSH PRIVILEGES;
exit

Step 4: Installing Wordpress
#cd /tmp
#wget http://wordpress.org/latest.zip
#unzip -q latest.zip -d /var/www/html/
#chown -R www-data:www-data /var/www/html/wordpress
#chmod -R 755 /var/www/html/wordpress
#mkdir -p /var/www/html/wordpress/wp-content/uploads
#chown -R www-data:www-data /var/www/html/wordpress/wp-content/uploads

Open web browser
http://ipaddress/wordpress

I now want to install a second site on localhost wordpress. I started directly from step 3. Create new database and admin. But now I'm stuck at step 4 and would like to know how I should proceed because wordpress has already been installed once before. Thank you
timbow
Level 1
Level 1
Posts: 44
Joined: Wed Oct 11, 2017 6:06 pm

Re: How to install second local wordpress site on LAMP?

Post by timbow »

A little confusion I think because the wordpress download once unzipped is all in a containing folder named 'wordpress'. Normally to make a new wp site once you have created the new database you would create a folder/directory in your localhost root, so in your case you would make the folder
/var/www/html/newsite
Then put all the contents of the wp download but not the containing folder into /newsite and do the wp install through the browser at
localhost/newsite/wp-admin/install.php

The method you describe puts the wp download including the containing folder into the localhost root giving you the site at
localhost/wordpress

The orthodox wordpress install is described here:
https://codex.wordpress.org/Installing_ ... stallation
I can't tell you anything about the chown and chmod stuff. Therein madness lies.

What video and instructions were you using?
kukamuumuka

Re: How to install second local wordpress site on LAMP?

Post by kukamuumuka »

Install PhpMyAdmin, and use symbolic links and install the site into you $HOME directory.
viewtopic.php?f=47&t=265925&p=1445406&h ... n#p1445406
SamLearnsLinux

Re: How to install second local wordpress site on LAMP?

Post by SamLearnsLinux »

timbow wrote: Tue Jul 10, 2018 11:54 am A little confusion I think because the wordpress download once unzipped is all in a containing folder named 'wordpress'. Normally to make a new wp site once you have created the new database you would create a folder/directory in your localhost root, so in your case you would make the folder
/var/www/html/newsite
Then put all the contents of the wp download but not the containing folder into /newsite and do the wp install through the browser at
localhost/newsite/wp-admin/install.php

The method you describe puts the wp download including the containing folder into the localhost root giving you the site at
localhost/wordpress

The orthodox wordpress install is described here:
https://codex.wordpress.org/Installing_ ... stallation
I can't tell you anything about the chown and chmod stuff. Therein madness lies.

What video and instructions were you using?

Hello. I used https://www.youtube.com/watch?v=oLsA2kj_bMU and the instructions I quoted above are the ones shown in the video and also available in the description box of the video. Let me know if I should uninstall everything and set everything up again. I currently have no data on wordpress and nothing to lose
SamLearnsLinux

Re: How to install second local wordpress site on LAMP?

Post by SamLearnsLinux »

administrollaattori wrote: Tue Jul 10, 2018 1:47 pm Install PhpMyAdmin, and use symbolic links and install the site into you $HOME directory.
viewtopic.php?f=47&t=265925&p=1445406&h ... n#p1445406
If I set up phpmyadmin as suggested on the page you linked, all i have to do to install a new site locally is

Code: Select all

mkdir mysite1
sudo ln -s $HOME/mysite1 /var/www/html
and lets say a second site

Code: Select all

mkdir mysite2
sudo ln -s $HOME/mysite2 /var/www/html
?
kukamuumuka

Re: How to install second local wordpress site on LAMP?

Post by kukamuumuka »

SamLearnsLinux wrote: Wed Jul 11, 2018 3:59 am
administrollaattori wrote: Tue Jul 10, 2018 1:47 pm Install PhpMyAdmin, and use symbolic links and install the site into you $HOME directory.
viewtopic.php?f=47&t=265925&p=1445406&h ... n#p1445406
If I set up phpmyadmin as suggested on the page you linked, all i have to do to install a new site locally is

Code: Select all

mkdir mysite1
sudo ln -s $HOME/mysite1 /var/www/html
and lets say a second site

Code: Select all

mkdir mysite2
sudo ln -s $HOME/mysite2 /var/www/html
?
Correct. :wink:
SamLearnsLinux

Re: How to install second local wordpress site on LAMP?

Post by SamLearnsLinux »

administrollaattori wrote: Wed Jul 11, 2018 2:56 pm
Correct. :wink:
Thank you. Once last thing, lets say I don't want my /home to be cluttered, can I create a folder and install all sites in it as

Code: Select all

sudo ln -s $HOME/localwordpress/mysite1 /var/www/html
SamLearnsLinux

Re: How to install second local wordpress site on LAMP?

Post by SamLearnsLinux »

SamLearnsLinux wrote: Thu Jul 12, 2018 12:19 am
administrollaattori wrote: Wed Jul 11, 2018 2:56 pm
Correct. :wink:
Thank you. Once last thing, lets say I don't want my /home to be cluttered, can I create a folder and install all sites in it as

Code: Select all

sudo ln -s $HOME/localwordpress/mysite1 /var/www/html
Also, after the above, I would still have to create a new database for each site on mysql, admin, password, grant permission etc right?
kukamuumuka

Re: How to install second local wordpress site on LAMP?

Post by kukamuumuka »

SamLearnsLinux wrote: Thu Jul 12, 2018 12:19 am Thank you. Once last thing, lets say I don't want my /home to be cluttered, can I create a folder and install all sites in it as

Also, after the above, I would still have to create a new database for each site on mysql, admin, password, grant permission etc right?
Yes.
Locked

Return to “Software & Applications”