Email This List Email This List Print This List Print This List

How to migrate a Word­Press site to an Ubuntu Serv­er

  1. Cre­ate dir­ect­ory in /​www
  2. Cre­ate backup dir­ect­ory and put backups in there. Upload backups (SQL and site files)
  3. Change per­mis­sions on backups.
  4. Cre­ate SQL data­base. Set per­mis­sions
  5. Extract site to folder
    1.      tar ‑zxvf file.tar.gz
  6. Con­fig­ure wp-con­fig. Change SQL data­base and user, change FTP path as so:
    define(‘FTP_USER’, ‘user’);
    define(‘FTP_PASS’, ‘pass­word’);
    define(‘FTP_HOST’, ‘loc­al­host’);
    define(‘FTP_BASE’, ‘/​wordpress/​’);
    define(‘FTP_CONTENT_DIR’, ‘/word­press/wp-con­tent/’);
    define(‘FTP_PLUGIN_DIR ‘, ‘/word­press/wp-con­tent/plu­gin­s/’);
  7. Change per­mis­sions on the site files
  8. Import SQL backup
    1.      gun­zip < [backupfile.sql.gz] | mysql ‑u [uname] ‑p[pass] [dbname]
  9. Cre­ate Vir­tu­al Host
    1. cp /etc/apache2/sites-available/ /etc/apache2/sites-available/
    2. enable the site
      sudo a2ensite
    3. Restart Apache
  10. Change DNS records of site.
  11. Delete backups. Keep cop­ies off site.
  12. Change MEDIA UPLOAD folder to the cor­rect loc­a­tion so that your media files load prop­erly.

Related Post

admin has written 133 articles