wordpress ftp using google cloud platform - wordpress

I am doing some testing to determine the feasibility of moving my small web hosting business over to Google Cloud Platform. All of my client websites are Wordpress sites built by me and i also fully manage them.
I have setup a free 60 day trial and am about to install my first project...which will be a prebuilt CMS (Wordpress) found in the software packages list in Google Developers Console.
There are at least 2 things i am wanting to test...
1. using wordpress multisite (as i intend to move all of my existing clients websites into Wordpress MU
2. Speed of websites on this network (one concern is latency as the datacenter location not being in my country)
So in order to test the above, i would like to setup some clones of existing client websites on the Google Cloud Project i create.
Question...
How do i get file and directory access to the Wordpress CMS on Google Cloud so i can upload Websites produced on my local system or another server?
(i need to copy up media files e.g. images, content, and themes)
Or is my only means of file directory access via Wordpress plugins with this solution?

Depends on which tool you choose to use.
If you use Wordpress for AppEngine, you'll have to use a combination of deployment techniques and plugins to get data onto your instance.
If you use Wordpress Multisite then you would interact with it just like any other install of Wordpress.

1) Create a key pairing (https://cloud.google.com/compute/docs/instances/connecting-to-instance#standardssh)
2) Connect via SFTP (CyberDuck, FileZilla)
3) Upload files into your /home/yourusername directory
4) Connect to the server via shell, you can do this from your Google Dashboard (Google Shell)
5) Change your user to Root by typing sudo /bin/bash
6) Now you can move files sudo mv file/you/want/to/move.html /var/www/html/

I recommend you use SFTP, but if you want to connect with FTP see this blog to solve your problems.
If your VM is based on Linux then you have to use an application like vsftpd to set up an FTP server.
Here are the steps:
Deploy a Virtual Instance on Google Cloud
Open SSH terminal
Installing VSFTPD
Create a User
Configure vsftpd.conf file
Preparing an FTP Directory
FTP/S or FTP over SSL setup (optional)
Opening Ports in Google Cloud Firewall
Test and Connect

Related

Ho to configure WordPress with GitLab

I'm pretty new to this, but I want to configure my GitLab repo to my Cpanel hosting account. So when I push changes from my local site (environment using local by flywheel) to GitLab it automatically goes to the staging site and if everything is good to the production site.
I have managed to connect my Cpanel account with GitLab by using Deploy HQ. However, I'm trying to understand the best way to set all of this up. Currently, I'm only tracking my themes folder in GitLab. My issue is that when I deploy, all that is getting uploaded is the themes folder(obviously). How do I set this up so it will upload the full WordPress site and database? Also, how do I set it up with staging and production, would I have two different branches connected to two different directories on cpanel?
I'm just looking for some noob friendly advice on how to set up this infrastructure for WordPress Git and Cpanel.

Install WordPress Site Inside a Subdirectory of Another WordPress Instance on Google Cloud Platform

I installed an instance of WordPress (Click to Deploy) on Google Compute Engine, but I would like to install another instance in a subdirectory of that, such as www.mywebsite.com/anotherwebsite. Is there a way to create an instance inside of another? Also, I have FTP access so I could install WordPress myself in the subdirectory but I need a database to connect to. Is there a way to just create a MyQL database without WordPress? Any suggestions welcome.
Thanks!
I installed an instance of WordPress (Click to Deploy) on Google
Compute Engine, but I would like to install another instance in a
subdirectory of that, such as www.mywebsite.com/anotherwebsite. Is
there a way to create an instance inside of another?
Provided that you do not pick a WordPress directory name, WordPress won't even know that another WordPress installation is installed. However, you will need to set up Apache to correctly handle the directories for each VirtualHost. If you plan to run both WordPress installations on the same IP/port you will have work to do to correctly setup httpd.conf
Is there a way to just create a MySQL database without WordPress? Any
suggestions welcome.
Yes. Just install the MySQL CLI (mysql). You can connect to the MySQL server and create a new database named differently than the first WordPress installation.
I recommend creating a new MySQL user for the second WordPress installation. Then edit wp-config.php and set up the correct parameters for the home directory location, server name, port, database, etc.
Unless you understand WordPress well, have lots of time to configure and test everything, understand how to dual host with Apache, why do this? Just create another VM and install WordPress on its own installation. Additional options are App Engine (Standard and Flexible) and Kubernetes.

Updating Wordpress inside a container. No FTP access

I installed a Wordpress website with the wordpress Docker image, and then installed my themes. All works well, but when I want to update Wordpress later on, I get this message:
To perform the requested action, WordPress needs to access your web server. Please enter your FTP credentials to proceed. If you do not remember your credentials, you should contact your web host.
The Wordpress container is not running an FTP server on the web root. How could I solve this problem?
PS: I have my web root in a data container, shared among different containers.
PS2: I am planning on storing several Wordpress websites in the same host. Is there also a solution that is compatible with this?
The key is to make sure your web server is the owner of the directory WordPress is installed in (and its sub-directories). You're seeing an error because your web server doesn't have the proper privileges to write to your directories.
I recommend running a chown -R user:group /path/to/wordpress, substituting the user and group with your server's info.

How do I access Wordpress core files like wp-content on google cloud after doing one click install?

I have experience installing wordpress websites on hosting where we have a cpanel to access the core files. What is the equivalent on Google Cloud?
I have tried to find a solution to this and I have installed gcloud and Filezilla. With gcloud, I was able to get public and private keys. However, when I added the private key to Filezilla, I have not been able to connect to the Wordpress host IP address. Any help would be appreciated.
If you use this click-to deploy and you want use a different tool instead of gcloud read here.
After you connect to the VM, as described here, you find WP files in
4. Creates a data disk and mounts it in the /wordpress directory (A symlink points from /var/www to this directory)

how can i synchronize wordpress between local side and remote side?

I have installed wordpress in my free web space, and also intalled it in my local pc.
I have to write blog in local wordpress when can't get web.
How to synchronize wordpress between local and remote side ?
which plugin can i download to do the job?
should i write some php code to synchronize wordpress?
I can do the job by hand,export my blog in the xml format file from remote wordpress in which i installed on my free web space,and import the exported xml format file into my local wordpress,can i do that job automatically?
There's a Wordpress plugin called Database Sync which lets you sync your WP database across multiple servers like Dev, QA and Production. But it doesn't let you sync your uploaded files.
http://wordpress.org/plugins/database-sync/
You could use a FTP synchronization software to keep your uploaded files synced. I use WinSCP for that.

Resources