michelmany
4/28/2016 - 7:10 PM

Deploy Wordpress to Linode using ubuntu

Deploy Wordpress to Linode using ubuntu

local:
    vhost: "http://amshoes.woo" # sem barra no final
    wordpress_path: "/var/www/amshoes.woo" # use an absolute path here

    database:
        name: "amshoes"
        user: "root"
        password: "nit1049"
        host: "127.0.0.1"

staging:
    vhost: "http://amshoes.tk" # sem barra no final
    wordpress_path: "/var/www/amshoes" # use an absolute path here

    database:
        name: "amshoes"
        user: "root"
        password: "nit1049"
        host: "localhost"
        # port: "3308" # Use just in case you have exotic server config

    exclude:
        - ".git/"
        - ".gitignore"
        - ".sass-cache/"
        - "node_modules/"
        - "bin/"
        - "tmp/*"
        - "Gemfile*"
        - "Movefile"
        - "wp-config.php"
        - "wp-content/*.sql"
        - ".htaccess"

    # paths: # you can customize wordpress internal paths
    #   wp_content: "wp-content"
    #   uploads: "wp-content/uploads"
    #   plugins: "wp-content/plugins"
    #   themes: "wp-content/themes"
    #   languages: "wp-content/languages"
    #   themes: "wp-content/themes"

    ssh:
        host: "45.79.178.233"
        user: "root"
    #   password: "password" # password is optional, will use public keys if available.
    #   port: 22 # Port is optional
    #   rsync_options: "--verbose" # Additional rsync options, optional
    #   gateway: # Gateway is optional
    #     host: "host"
    #     user: "user"
    #     password: "password" # password is optional, will use public keys if available.

    #ftp:
    #  user: "nicolaujoias"
    #  password: "nit1049"
    #  host: "186.202.127.13"
    #  passive: true

    # production: # multiple environments can be specified
    #   [...]
Caso dê erro 500 (Internal error) basta colocar a permissão de pastas para 755 e arquivos para 0644

Pelo filezilla mesmo consigo alterar isso!
1) Access the serve via SSH:
ssh root@45.79.178.233

2) Create a folder for the project:
sudo mkdir /var/www/project_name/src/

3) Create Vhost
cd /etc/apache2/sites-available/

4) Copiar um dos sites já configurados
sudo cp -a floresdemaria.confi nomedoprojeto.conf

5) Alterar com dados do projeto:
vim nomedoprojeto.conf
substituir com nome do projeto
salvar e sair: :wq

6) Ativar o site
sudo a2ensite example.com.conf
sudo service apache2 restart

7) Criar banco de dados no Linode
mysql -uroot -pnit1049
create database nomedoprojeto;
exit

7) Sai do acesso ssh e acessa a pasta do projeto na máquina
exit

8) Acessar painel Linode
Acessar o DNS Manager e criar um domain.tk zone

8) Acessar http://www.freenom.com/ com a conta do facebook
Criar o domínio .tk
Em namespaces colocar os seguintes:
NS1.LINODE.COM
NS2.LINODE.COM
NS3.LINODE.COM
NS4.LINODE.COM
NS5.LINODE.COM


9) Inicia o wordmove que já está instalado globalmente na máquina
wordmove init

10) Edit the Movefile with the follow codes

11) Set the owner of the new directory to be your web server’s user. In this instance, our web server is Apache:
sudo chown -R www-data:www-data /var/www/

https://www.linode.com/docs/websites/cms/how-to-install-and-configure-wordpress