migrating Wordpress site to ISPConfig

Discussion in 'General' started by nzAndy, Jan 26, 2023.

  1. nzAndy

    nzAndy Member

    Hi, what is the best method to migrate an existing Wordpress site on a Bluehost server cPanel into my home server Ubuntu ISPConfig Version: 3.2.9
    I had a quick look at the ISPConfig3 Migration Tool, but no idea if this is the best way, or there is another?
    thanks!

    actually I just had a thought, maybe install a blank Wordpress in my ISPConfig and import the existing Wordpress site though the Wordpress import function?
     
    Last edited: Jan 26, 2023
  2. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Simply compress your WP files there, bring the compressed file to its website folder in your ISPConfig server and extract it. You do something similar its database, i.e. download it and restore it in your ISPConfig server. You need to fix its config a little especially its new path, domain, if you use a different one and its database name and password, but that's about it.
     
  3. nzAndy

    nzAndy Member

    thanks ahrasis!,
    a couple of questions,
    - where is the ISP site folder that the database sits in?
    - which file/s has the old folder paths in it that I need to change? If not too many to list
    (data base name/user details etc to change are in wp-config I believe)
    cheers
     
  4. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It does not work that way. To import database, take database dump on the old host, then use PHPMyAdmin or command line mysql to import the dump.
    That should work too. I think there is Wordpress plugin that must be installed on both wordpresses, then it makes a package that is imported on the new Wordpress.
     
  5. nzAndy

    nzAndy Member

    okay good thanks Taleman, I will give it a try and see how I go
     
  6. nzAndy

    nzAndy Member

    I tried to import the database sql file using myphp, but it has a 2mb limit which is incredibly tiny, my test website is only a few pages and it was double that.
    I see there are a number of options and discussion for increasing the php upload file size limit, adding code in .htaccess (which didnt work for me) creating a php.ini file and changing the code in linux php.
    I eventually will move my larger websites to my home server so I want to get it right, what would you recommend is the best way to increase the upload file size in myphp?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    What do you mean with myphp, phpMyAdmin? Which kind of server is your new system, an ISPConfig Apache or Nginx web server?
     
  8. nzAndy

    nzAndy Member

    through the ISPConfig Apache website database phpMyAdmin (see attached screenshot for limit) running on Ubuntu 22.04
     

    Attached Files:

  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Edit the file /etc/php/8.1/fpm/php.ini and increase the upload limit and post limit there. Then restart PHP fpm:

    systemctl restart php8.1-fpm
     
  10. nzAndy

    nzAndy Member

    great, thanks for that!
     
  11. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    use the wp plugin - duplicator by snap-creek.. to create an install.php file, and an archive file of your entire site (includes the db)
    download both the files it creates, then upload them to the website folder on ispconfig. (assuming you've already created the site and db config in ispconfig)
    then browse to the install script on ispconfig, ie domainname.tld/install.php
    assuming you've changed the dns if using the same domain, or added it to your local hosts file, it'll then walk you through re-installing the site onto the ispconfig server..
     
    ahrasis likes this.
  12. nzAndy

    nzAndy Member

    Thanks nhybgtvfr, actually I did some research and have started using that plugin, I have successfully migrated my smallest site so far and have 2 more WordPress sites that are considerably larger, I might have to splash out for the Pro version if not successful with the free version.
    Also a have a forum site (non WordPress) but I will leave until last
     
  13. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    for sites too large for the free version.. just use it for the database... zip/tar up all the website files themselves, and copy them over the ispconfig server in one go and then extract them into /web. the chown -R <webid>:<clientid> everything you've just extracted. then run the duplicator install.php file as normal.
    i've moved some pretty large sites this way, never needed the paid for version yet.... although i guess they do deserve some money for their work...
     
    ahrasis likes this.
  14. nzAndy

    nzAndy Member

    That's a good idea, cheers!
     
  15. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Might as well learn to do that all manually as I already suggested earlier as using free WP plugin is sometimes not safe.
     
  16. nzAndy

    nzAndy Member

    I did try for quite a number of hours but gave up in the end, and gave the plugin a try.
    I did as you said above, everything was migrated across ok, updated the config file and changed to the new folder path in the database file, but just couldn't get it to work
     
  17. nhybgtvfr

    nhybgtvfr Well-Known Member HowtoForge Supporter

    a lot depends on how you changed the folder paths in the db file.. a lot of them are part of the wp content, they have string lengths set, they need to be changed using a wp aware method, eg the database replace function in wp-cli, or you need to go through and work out the regex to add / subtract from the string length number if it exists, or change each one manually... and i don't recommend trying either of those last two methods...
     
  18. nzAndy

    nzAndy Member

    thanks nhybgtvfr, I will give the wp aware method a go on my next site, cheers
     

Share This Page