Jump to content

Migration from Staging Environment


quickjeff
 Share

Recommended Posts

Hi Guys, 

I wanted to post this thread to get some insight as to how others are migrating from a staging directory inside a live server to the actual root directory.

I typically develop a project locally using Mamp and then move into a staging environment on a staging server . There are some cases the project requires to move the site into a directory inside a live site to make deployment of the new project move faster.

When I move a project into a directory on the live server of domain.com/test/ I run into an issue of content links.

What I mean is that I look at the source code in the CKEDITOR for a field and the link will display:

 domain.com/test/whatever-the-link-is/ 

or 

domain.com/test/assets/file.pdf

or

domain.com/test/assets/image.jpg 

 

The issue is, when I move to a live site, I have to go back and change tons of links from:

domain.com/test/whatever-the-link-is/

to 

domain.com/whatever-the-link-is/  

 

How are you guys making the link changes across the entire site at once?

Are you using SQL Commands? Something in ProcessWire?  Any suggestions will help eliminate the manual process. :-)

Link to comment
Share on other sites

At least for links to pages, you can enable the builtin link abstraction feature that came with PW 3.0.6. I haven't used it myself (wrote my own link abstraction shortly before 3.0.6 came out and mine ties into other modules/workflows I use), but from what I saw in the code, it should deal with any path changes on its own. You're left to handle images yourself though (I think).

  • Like 1
Link to comment
Share on other sites

2 hours ago, quickjeff said:

What I mean is that I look at the source code in the CKEDITOR for a field and the link will display:

 domain.com/test/whatever-the-link-is/ 

For me, all internal links made in a CKEditor field are relative links, and these wouldn't need to be updated if the site was moved to a subdirectory. Not sure why you would be getting absolute links in yours.

There is a config setting for ProcessPageEditLink to set the URL type:

page-link.png

Strangely, mine is set to "Absolute", but maybe this means "absolute relative to the site root"?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Similar Content

    • By Aswincs
      Here are the step by step to install and setup ProcessWire with the help of a server management tool - https://cloudstick.io/
      1. Create your Vultr compute.

      2. Select the Operating system Ubuntu 16.04/18.04/20.04 LTS >> Enter your server root password then click on Deploy now!

      3. Create an account in CloudStick and connect your server:
       
      Click on connect server >> Enter your server login details >> Add this server.

      4. Your server setup will be done in couple of minutes - The setup will finish less than 8 minutes. Then select your server:

      5. Create an account to host/upload ProcessWire: Click on Accounts >> Create an account >> Create Custom Web application:

      6. Enter the web application details, such as the email address which you would like to receive the SFTP login details >> web application name >> Domain name >> username then >> select the web application stack >> nginx + apache >> then create web application. 

      7. Now select the web application then install SSL: 
      8. Open your email account, and find the login details to connect the server over SFTP >> then upload the source code of ProcessWire:

      9. Let us open the domain in browser once the upload finish.

      10. Select the profile and click next:

      11. Click next to proceed further: Now, you will see an incompatibility issue with PDO-Mysql which can be install in 2 clicks.

       
      12. Go back to the summary page >> Click on easy PHP >> Select the PHP version of your web account:

      13. Then it is time to enable PDO_Mysql, scroll down and enable it:

      14. Go back to to the ProcessWire installation URL and click on check again >> You can see no incompatibility issue after enabling PDO_Mysql:

      15. Click on Next and now it is time to enter the database credentials:

      16. let us create the database, db user and grant privilege's to the db user - it is just matter of few clicks and very easy! 
      Click on the menu Accounts >> Select your web account of ProcessWire >> Click on App Database then create the a database:

      17: Click on create database and enter the database name:

      18. Create the database user:

      19: Go back to the database page and click on Grant user then grant permission:

      20. Go back to the ProcessWire installation URL and enter the database credentials you have created in CloudStick dashboard.
      Now, it is time to setup your admin user credentials and setup admin area URL:

      21. Then you are done:


    • By iipa
      Hi everybody!
      I have been reading about Multisite, but it kinda bugs me that every topic talks about having both admin and database same for multiple sites.
      I have a project where customer tests it by adding content to the site, while I still need to do some changes here and there in code, maybe some in database. If something crashes for a while, customer can't keep testing, which is a bit problematic.
      Is there any way that I could have two separate versions of one site ("production" and development) that share the same database, but are otherwise independent? Just the thought of having to migrate database every time I want to show client something new gives me anxiety 😁
    • By thlinna
      I am running development server where I test and try the changes in fields and templates of ProcessWire. The php files are stored in git@bitbucket. 
      The part of managing changes and versions of php code itself via git is quite straightforward, as I presume we all know. However, I have not been able to come up with decent way of moving the changes in fields, templates, modules and settings from development to production other than repeating them, step-by-step, manually in production environment via the admin back-end.
      Perhaps there is more sophisticated way of transferring these changes?
    • By formmailer
      Hi!
      I am redesigning my site and set up a development version of the site (plain copy) using the same database. 
      During the redesign process I became interested in the CroppableImage module, which requires the dev version of PW.
      I upgraded the files in my development sites, but want to check with you before I start installing the new modules in the test version:
      Can this cause problems with the production site as long as it isn't using any of the new fields/modules?
      //Jasper 
    • By quickjeff
      Hi Guys, 
      So we have been working with ProcessWire for sometime now.  We absolutely love ProcessWire so much that we have changed our site from a custom build on a custom CMS to WordPress and now ProcessWire and will never go back to anything else.  We launched a small version of our site to test the migration from WordPress a couple months ago and now have finalized a new look and feel.  We are a small team based out of the Chicagoland area that is eager to grow.
      Our go to CMS is ProcessWire for our clients.  
      Please take a peak at:
      QuickToImpress.com
      We are currently running the latest version of ProcessWire with Template Editor Module.
      We are looking to start building some of our own modules in the near future.
      Ryan Cramer, thank you for such an incredible CMS.  ProcessWire community, thank you for such an amazing group of fellow developers, designers and SEOS.  You guys are all great and have helped us grow so much with answers to API questions, suggestions and advice.
×
×
  • Create New...