Plesk: best way to manage stage/beta website?

Need help installing Joomla! 3.x? For all Joomla! 3.x installation issues please use this forum.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Post Reply
zaknokimi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 31, 2015 10:37 pm

Plesk: best way to manage stage/beta website?

Post by zaknokimi » Sat Sep 15, 2018 7:48 pm

Hello, I have minimal knowledge in server management so I was hoping to ask some questions which may appear simple to others.

So I have a main website on a server managed by Plesk, for example sake let's call it rubber.com, this is placed in:
/var/www/vhosts/rubber.com/httpdocs/
the temp and log directories in global configuration point to:
/var/www/vhosts/rubber.com/httpdocs/tmp/ for tmp (and logs for logs)

Now I created a subdomain called beta.rubber.com and...
1) copied website to
/var/www/vhosts/rubber.com/beta.rubber.com/
2) copied database and assigned the above website to it.

The concerns I have now are...
1) The beta website's logs and tmp directories point to the main website's. Is there a problem with this? Would it be better to make a root-level logs and tmp folder and give them both access to it?
2) The configuration.php lost its writing permissions so I need to modify the access (and this may happen everytime I copy websites).
3) The aim is to make changes to beta.rubber.com a staged website so that I can:
- Update, test, modify content and just do stuff.
- Overwrite the main website with the beta website after every change (note the website is asked to be frequently updated e.g text changes, etc).
- The concern is the practicality of replacing the main site with the beta site, is this how it's supposed to be done?
- I might be missing something, this is the first time I'm setting up a staged site, before I used to develop on the live sight and it caused risks in case something messed up.
- I use Akeeba backup which is great, but any concerns when recovering from it in case something messes up?

Thanks!

The easiest thing might be for you to explain your whole approach to managing a stage site and how you replace the main site with it or use it.

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35176
Joined: Sat Apr 05, 2008 9:58 pm

Re: Plesk: best way to manage stage/beta website?

Post by Webdongle » Sat Sep 15, 2018 8:14 pm

For future reference Akeeba is the best method https://docs.joomla.org/Copying_a_Joomla_website
And is good for backups.


N.B.
Make sure the site in the sub domain has it's own database. i.e. export the Site database and import it into a new database. Then edit the configuration.php (of the sub domain) to connect to the new database.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19021
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Plesk: best way to manage stage/beta website?

Post by leolam » Sun Sep 16, 2018 8:59 am

The subdomain should have it's own /tmp and /logs folders imho. You need to adjust this in your configuration. To find the correct path for the subdomain Tcopy the following code into a text editor (i.e. JEdit, Notepad++, etc), save the file as a .php naming it whatever you prefer (i.e filename.php.).

Code: Select all

<?php 
 $path = getcwd();
 echo "Your Absoluthe Path is: ";
 echo $path;
 ?> 
Using your FTP software, ftp the file you have just created to your root folder.

Open your web browser and type in http://www.yourdomain.com/filename.php. The result will show the absolute path!

When you have the path change it in the global config file of your subdomain and remove 'filename.php' file for security reasons

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team

zaknokimi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 31, 2015 10:37 pm

Re: Plesk: best way to manage stage/beta website?

Post by zaknokimi » Sun Sep 16, 2018 3:41 pm

Webdongle wrote:
Sat Sep 15, 2018 8:14 pm
For future reference Akeeba is the best method https://docs.joomla.org/Copying_a_Joomla_website
And is good for backups.


N.B.
Make sure the site in the sub domain has it's own database. i.e. export the Site database and import it into a new database. Then edit the configuration.php (of the sub domain) to connect to the new database.
Thank you.
I've used Akeeba to restore backups so it definitely is handy.

So how will the process work exactly if you don't mind me asking?

1) You have Main-Website with Main-DB, and then you have Beta-Website with Beta-DB.
2) You develop on Beta-Website (and Beta-DB).
3) You backup Beta-Website and Beta-DB as .jpa and plan to overwrite the Main-Website and Main-DB with it.
4) How does this work exactly? e.g.
> When restoring and it asks for DB settings, do you enter Beta-DB or Main-DB settings?
> What changes always need to be made to avoid directory issues e.g. tmp/logs folder paths? Or can these automatically be found?

Thanks!

zaknokimi
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat Oct 31, 2015 10:37 pm

Re: Plesk: best way to manage stage/beta website?

Post by zaknokimi » Sun Sep 16, 2018 3:43 pm

leolam wrote:
Sun Sep 16, 2018 8:59 am
The subdomain should have it's own /tmp and /logs folders imho. You need to adjust this in your configuration. To find the correct path for the subdomain Tcopy the following code into a text editor (i.e. JEdit, Notepad++, etc), save the file as a .php naming it whatever you prefer (i.e filename.php.).

Code: Select all

<?php 
 $path = getcwd();
 echo "Your Absoluthe Path is: ";
 echo $path;
 ?> 
Using your FTP software, ftp the file you have just created to your root folder.

Open your web browser and type in http://www.yourdomain.com/filename.php. The result will show the absolute path!

When you have the path change it in the global config file of your subdomain and remove 'filename.php' file for security reasons

Leo 8)
Thanks Leo.

The path is already set so that's fine for the moment. The issue I'm having right now is finding the best method of replacing the main-website with the beta-website.

Someone else has suggested Akeeba Backup which sounds good, but I'm just confused as to how the recovery works.

In the past, I used Akeeba backup to restore 1 website only when it broke, but I never used it to use a staged website to replace a main website, including migrating from one DB to another DB.

Thanks!

User avatar
Webdongle
Joomla! Master
Joomla! Master
Posts: 35176
Joined: Sat Apr 05, 2008 9:58 pm

Re: Plesk: best way to manage stage/beta website?

Post by Webdongle » Sun Sep 16, 2018 3:48 pm

To be sure there is no conflict
Delete the files on the man site and drop the database files
Copy the .jpa and kickstart.php to the main site
Run kickstart.php and enter the database details for the site database.
http://www.weblinksonline.co.uk/
https://www.weblinksonline.co.uk/updating-joomla.html
"The definition of insanity is doing the same thing over and over again, but expecting different results": Albert Einstein

User avatar
leolam
Joomla! Master
Joomla! Master
Posts: 19021
Joined: Mon Aug 29, 2005 10:17 am
Location: Netherlands/ UK/ S'pore/Jakarta/ North America
Contact:

Re: Plesk: best way to manage stage/beta website?

Post by leolam » Sun Sep 16, 2018 3:52 pm

Kevin (Webdongle) gave a very good advise. No need to be confused.. You do exactly what you did in the past....You restore your site to a different location. Just follow up on Webdongle's advise

Leo 8)
Joomla's #1 Professional Support Provider:
-> Joomla Professional Support: https://gws-desk.com -
-> Joomla Specialized Hosting Solutions: https://gws-host.com -
Member Joomla Bug Squad & Joomla CMS Release Team


Post Reply

Return to “Installation Joomla! 3.x”