Navigation

    ML
    • Register
    • Login
    • Search
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups

    WordPress website migration

    IT Discussion
    lets encrypt migration wordpress
    10
    20
    253
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • IRJ
      IRJ last edited by

      I want to migrate my WordPress site from server1.mydomain.com to server2.mydomain.com

      What is the best way to accomplish this? I'd rather not use GUI tools of any kind.

      My initial thoughts are rsync to copy WordPress files and doing a mariadb export. I would also need to copy the apache config file as I made a couple changes.

      So i setup server 2 with the same exact commands. I literally just copied my history minus passwords of course. However, when I request a LE cert, I get a message stating I have no virtual hosts listening on port 80.

      It's really weird because i am using same OS centos7 and literally copied my commands.

      StuartJordan JaredBusch Emad R wirestyle22 4 Replies Last reply Reply Quote 0
      • StuartJordan
        StuartJordan @IRJ last edited by StuartJordan

        @IRJ I've moved Wordpress to different servers quite a few times.

        1. I normally deactivate any wordpress plugins first.
        2. I export the sql to a file.
        3. I copy all wordpress files from the Public_html Directory to a tar or zip.
        4. I then create a new database and database user on new host.
        5. I edit the WP-Config.php file and change to reflect the new database details.
        6. I then import the sql to the new database using phpmyadmin.
        7. Upload the compressed file and extract on new host into the Public_html folder.
        8. activate the plugins again.

        (You don't have to change the database details, you could create the same, but why the hell not change the password while your at it)

        1 Reply Last reply Reply Quote 2
        • JaredBusch
          JaredBusch @IRJ last edited by

          @IRJ are you sure you opened the firewall, etc on the new server?

          Did you copy over the Apache config file for your site?

          IRJ 1 Reply Last reply Reply Quote 0
          • IRJ
            IRJ @JaredBusch last edited by

            @JaredBusch said in WordPress website migration:

            @IRJ are you sure you opened the firewall, etc on the new server?

            Did you copy over the Apache config file for your site?

            Firewall rules are in place. I haven't copied the config yet.

            jmoore 1 Reply Last reply Reply Quote 0
            • IRJ
              IRJ last edited by

              Screenshot_2019-03-26-09-49-16-213_com.sonelli.juicessh.png

              1 Reply Last reply Reply Quote 0
              • dafyre
                dafyre last edited by

                If you are changing the domain name, you will need to do sed or something on the SQL file to update links to point to the new domain. Then you should be safe to import the SQL file.

                1 Reply Last reply Reply Quote 0
                • jmoore
                  jmoore @IRJ last edited by

                  @IRJ That is probably why then. Virtual host settings are in the apache config

                  1 Reply Last reply Reply Quote 0
                  • Emad R
                    Emad R @IRJ last edited by

                    @IRJ

                    Get familiar with wordpress CLI so you can change the web site site address from command line

                    IRJ 1 Reply Last reply Reply Quote 0
                    • IRJ
                      IRJ @Emad R last edited by

                      @Emad-R said in WordPress website migration:

                      @IRJ

                      Get familiar with wordpress CLI so you can change the web site site address from command line

                      Easy enough to do with wp-settings file as well. I did not need to change domains in this case though

                      1 Reply Last reply Reply Quote 0
                      • IRJ
                        IRJ last edited by

                        Everything is migrated over to new server. I confirmed that domain is resolving to the new server. I was not able to grab a new cert, but the old one appears to be working fine. Maybe it's because I was requesting a cert for the same domain?

                        1 Reply Last reply Reply Quote 1
                        • IRJ
                          IRJ last edited by

                          Well wtf copying the config didn't allow me to grab a let's encrypt cert. However it did fix my url rewrites, but that was expected.

                          Still same virtual host error.

                          1 Reply Last reply Reply Quote 0
                          • IRJ
                            IRJ last edited by IRJ

                            Screenshot_2019-03-26-19-07-16-865_com.android.chrome.png

                            Screenshot_2019-03-26-19-08-20-040_com.android.chrome.png

                            Screenshot_2019-03-26-19-11-18-062_com.miui.gallery.png

                            Doesn't full mean it's using my cert? This seems odd.

                            black3dynamite 1 Reply Last reply Reply Quote 0
                            • IRJ
                              IRJ last edited by IRJ

                              I see now that it doesn't verify certificate unless you select strict. OK back to figuring out the LE issue

                              Unable to find a virtual host listening on port 80 which is currently needed for Certbot to prove to the CA that you control your domain. Please add a virtual host for port 80.
                              
                              
                              1 Reply Last reply Reply Quote 0
                              • black3dynamite
                                black3dynamite @IRJ last edited by

                                @IRJ Full (strict) requires a valid certificate.
                                d920b4e4-3a7c-4261-b3a3-8d54009f9e1f-image.png

                                1 Reply Last reply Reply Quote 0
                                • JaredBusch
                                  JaredBusch last edited by

                                  Why use a LE cert if oyu have CloudFlare in front? Use the cloudflare cert for the machine.

                                  IRJ 1 Reply Last reply Reply Quote 4
                                  • IRJ
                                    IRJ @JaredBusch last edited by

                                    @JaredBusch said in WordPress website migration:

                                    Why use a LE cert if oyu have CloudFlare in front? Use the cloudflare cert for the machine.

                                    Fine

                                    travisdh1 1 Reply Last reply Reply Quote 0
                                    • travisdh1
                                      travisdh1 @IRJ last edited by

                                      @IRJ said in WordPress website migration:

                                      @JaredBusch said in WordPress website migration:

                                      Why use a LE cert if oyu have CloudFlare in front? Use the cloudflare cert for the machine.

                                      Fine

                                      I thought I had a guide around here on how to use LetsEncrypt with Cloudflare and an Nginx proxy. If not, I could write one quick enough when I get home, I have it scripted now. I'd imagine you could use the same setup for your Wordpres site.

                                      JaredBusch 1 Reply Last reply Reply Quote 0
                                      • JaredBusch
                                        JaredBusch @travisdh1 last edited by

                                        @travisdh1 said in WordPress website migration:

                                        @IRJ said in WordPress website migration:

                                        @JaredBusch said in WordPress website migration:

                                        Why use a LE cert if oyu have CloudFlare in front? Use the cloudflare cert for the machine.

                                        Fine

                                        I thought I had a guide around here on how to use LetsEncrypt with Cloudflare and an Nginx proxy. If not, I could write one quick enough when I get home, I have it scripted now. I'd imagine you could use the same setup for your Wordpres site.

                                        But what would be the point? You can have a 100% solid reliable encryption without that headache simply by using the machine CERT from cloud flair

                                        dbeato 1 Reply Last reply Reply Quote 1
                                        • dbeato
                                          dbeato @JaredBusch last edited by

                                          @JaredBusch said in WordPress website migration:

                                          @travisdh1 said in WordPress website migration:

                                          @IRJ said in WordPress website migration:

                                          @JaredBusch said in WordPress website migration:

                                          Why use a LE cert if oyu have CloudFlare in front? Use the cloudflare cert for the machine.

                                          Fine

                                          I thought I had a guide around here on how to use LetsEncrypt with Cloudflare and an Nginx proxy. If not, I could write one quick enough when I get home, I have it scripted now. I'd imagine you could use the same setup for your Wordpres site.

                                          But what would be the point? You can have a 100% solid reliable encryption without that headache simply by using the machine CERT from cloud flair

                                          or use the CloudFlare plugin for Wordpress..
                                          https://wordpress.org/plugins/cloudflare/

                                          1 Reply Last reply Reply Quote 1
                                          • wirestyle22
                                            wirestyle22 @IRJ last edited by

                                            @IRJ This would be a heck of a guide if you ever get the time to do it

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post