Jump to content
John W.

Renaming Processwire Site on Temporary Domain account to Permanent Domian account?

Recommended Posts

Summary: If I have a site sitting on a server called testing.com, then on the server change it to mycompany.com, do I have to modify any settings in ProcessWire?

After building several processwire for clients, the one question that I haven't had is about moving a processwire site from an old (temporary) domain to a new domain.

For instance, I typically setup development sites for clients and register a temporary domain (and lock with a password). For instance, thee client can go test.com and get all their content finalized, change wording, add news, swap out photos -- everything to make the site production read.  

Next, on my hosting account I can have testing.com renamed to theircompany.com - and change the nameservers.

A simple question here. If I have a hosting company rename the account from testing.com to theircompany.com, change my nameservers whereas going to theircompany.com loads the production site, Is there anything I need to change in the processwire configuration or in the PW database?

In the past, I've just manually copied the site, and fresh-installed PW, and imported the data. Seems like a lot of hassle.

I have a second part question about updating the PW core, however, after consideration I'll post it as a new topic.

Share this post


Link to post
Share on other sites

You don't need to change anything in the database. The only change needed in this case is the httpHosts array:

$config->httpHosts = array('testing.com'); 

in the config.php file. 

  • Like 3

Share this post


Link to post
Share on other sites

If it is a new install, then the user salt (site/config.php) will be different, which affects the passwords.

  • Like 2

Share this post


Link to post
Share on other sites
9 hours ago, rick said:

which affects the passwords

userAuthSalt: " it is forever tied to the passwords as a secondary salt."

But if you use the very same database and files normally you should only need to update $config->httpHosts as @Sérgio Jardim pointed it out above.

  • Like 2

Share this post


Link to post
Share on other sites

Hi,

I have a site that I want to change the primary domain at the hosting level. All else remains the same. I read the above posts but I cannot find this in my config.php. It is an old version of PW 2.3.1. Am I safe just to make the domain change anyway?

On 5/31/2017 at 10:46 PM, Sergio said:

$config->httpHosts = array('testing.com'); 

Share this post


Link to post
Share on other sites
On 11/11/2018 at 12:33 PM, NooseLadder said:

Hi,

I have a site that I want to change the primary domain at the hosting level. All else remains the same. I read the above posts but I cannot find this in my config.php. It is an old version of PW 2.3.1. Am I safe just to make the domain change anyway?

This was on old post. Actually, what I do is fresh install processwire on the server.  When I get ready to upload my project, I dump my local mySQL database, switch to the online site where I drop tables and import the database.  After that, I uncomment about 3 lines of code in my index.php file that changes the processwire admin password in the database. From there, I just login and also change the passwords for any other roles that my be set up.  Ryan pointed me to the info about setting the passwords via the PW api.

In the past I used phpMyAdmin to dump out the database, now I use the dbbackup() module, save the backup file, then switch to processwire on the server and use dbbackup() to import the dump.

Edited by John W.
metion module method of transferring mysql data
  • Like 1

Share this post


Link to post
Share on other sites

Thank for replies. Just to let you know I changed the primary domain on my hosting and the site works without any major changes. Just a few hardwired hyperlinks to change that include the old domain name.

Share this post


Link to post
Share on other sites
23 hours ago, NooseLadder said:

if I changed the site from http to https. Ie no major changes required?

Normally this is what you should do:

  • make sure templates are set to "HTTP or HTTPS" – which is the default – on the URLs tab and certainly not to "HTTP only"
  • in .htaccess, uncomment the rules under "9. If you only want to allow HTTPS, uncomment the RewriteCond and RewriteRule lines below."
  • and yes, a properly installed SSL is a must 😉 
  • recommended: also make sure you do not have any hardwired or third party http URLs

 

  • Like 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By abdulqayyum
      Hy everyone,
      i am using loginRegister module for front-end user login.
      In this module user can login with Email/username, i am showing with Email. done
      but not showing Email in Forgotton Password section. there still showing with username.

      i want to show Forgotton Password with Email instead username. and should reset with email.

      please help me in this section, how i can set it with Email.

      Thanks AbdulQayyum.
    • By abdulqayyum
      Markup-Google-Recaptcha is not working with LoginRegister module in Forgotton Password Form.
      Here is my code
      wire-> modules -> process -> ProcessForgotPassword.php
      protected function step1_renderForm() {
              $form = $this->modules->get("InputfieldForm");
              $form->attr('action', './?forgot=1');
              $form->attr('method', 'post');
          
              $field = $this->modules->get("InputfieldText");     
              $field->attr('id+name', 'username');
              $field->attr('class', 'redesign-field forgotPassFeild');
              $field->setAttribute('placeholder', 'Username');
              $field->required = true;
              $field->label = $this->_("Forgotton Password");
              $field->description = $this->_("If you cannot remember your password to access the affiliates portal. simply provide your username in the box below and we'll send you a reset link via email.");
              $form->add($field);
               
             // Calling MarkupGoogleRecaptcha Module.
              $captcha = $modules->get("MarkupGoogleRecaptcha");
             //  rendering form with recaptcha
              $captcha->render($form);
         
              $submit = $this->modules->get("InputfieldSubmit");
              $submit->attr('id+name', 'submit_forgot');
              $form->add($submit);
              $this->session->userResetStep = 1;
               
              // rendering form
               $out .= $form->render();
          
              // getting captcha script
              $out .= $captcha->getScript();
              return $out;
          }

      I am following this one example.

      please suggest me how i can show MarkupGoogleRecaptcha in forgotton password.
      Getting log error


      Thanks,
      Abdul Qayyum
    • By Mithlesh
      Hi there,
      My form is not getting submitted, it is showing:
      Unable to verify successful email delivery of this form submission.
      Attaching for your reference as well: 

      In the Backend, it is showing Connection timed out with smtp.gmail.com
      Pl guide me how to resolve that
    • By Sephiroth
      Hi guys, so since I moved to Processwire, it has been my default go-to CMF/CMS for my website and client applications, apparently my previous job took a toll on me, and made me have less time, but now finally had the chance to change my website to something I always had in mind.
      I decided to go with something minimal, as I tend to enjoy writing, so wanted a website to have more text than graphics and I think I whipped up something clean. Currently I still have more to do, but this is my current website, the main purpose to have a content driven website where I will be writing tutorials , articles more and hopefully  technical  notes.
      Please let me know your honest opinion.
      PS: I am more of a coder than a designer but i think this old dog still pulled it off
       
      https://okeowoaderemi.com/
       
       




    • By abdulqayyum
      hello processwire community,
      i am using LoginRegister module for front-end user registration. i am facing an issue verification email not receiving while WireMailSmtp is working perfectly and user receives message
      "Thank you, a confirmation code has been emailed to you. When you receive the email, click the link it contains, or paste the confirmation code below."
      received this message in front-end but does not receive any email relevant it.
      please help me in this case how i can solve it.
      Please check screen shots for SMTP test and message which receives user.
      Thanks AbdulQayyum,

      First screenshot SMTP test message, second when user receives message after clicking register button.
×
×
  • Create New...