I am currently trying to automate the our online store so that orders from our system get put into our logistics company's server. At the moment, our orders automatically go into a folder called 'automated-orders' on our server through a wordpress plugin. I cannot get this plugin to directly interact with the logistics server.
The goal:
To get a file (.csv file) in our 'automated-orders' folder to automatically (every night) be copied from a directory on our cpanel hosted web server to a ftp location on our logistics company website. Their server requires a login and password. There are some days where there may not be any order files so in this case it will just do nothing. Ideally, it will scan to see if there are any new files before doing the transfer.
I have been looking through these forums and others about cron jobs and wget and wput but don't think I have the syntax right as nothing happens. This is what I have as our cron line command:
wget /home/rhinospo/public_html/automated-orders --ftp-user=RH1 --password='PASSWORD' ftp://RH1#182.50.154.233/RH1/Incoming
Could someone please see what I am doing wrong in this syntax. Alternatively, is there another/better way to achieve what I am trying to do?
Cheers
You can use curl for this chase
curl -T /home/rhinospo/public_html/automated-orders ftp://182.50.154.233/RH1/Incoming --user RH1:password
Related
I have setup multiple hosts and everything was running fine until I wanted to deploy my website. All files uploaded via wordpress failed to transfer. I found out they had no Owner. So even me as a user/admin couldnt open them. I have to use powershell command "icacls * /reset /t /c /q" to fix the permissions and finally uploaded them but it doesnt sort this problem in a long term. Could anyone help me find out how to change the Owner with which Mamp saves files? Or is there any work around ? I havent been able to find anything in documentation not the interent.
My goal is to update 1 file on my Wordpress website on Google Cloud Engine using Filezilla to transfer it.
I am successfully logged into my files using SFTP. I'm on a Mac. I have my vm instance name from Google Cloud Engine but cannot find how to create a password.
I think if I can figure out how to create a ding dang password my next step is to type this in terminal:
sudo chwown "vm-name" /var/www/html
Any direction is much appreciated. My website has been down since yesterday b/c I messed with https plugin. I'm a designer and got in way over my head. Learned more than bargained for so far.
To run any linux command inside your instance you need to:
Generate a private/public key pair using Puttygen.
You need to add the content of your public key to GCP as in below answer.
How can i setup remote project with PhpStorm with Google Compute Engine running LEMP?
You need to open Putty.
In the Session menu enter yourusername#instance_external_ip as a hostname using connection type SSH
In the menu Connection/SSH/Auth browse and select your private key(the one generated at step 1).
Click Open. A new terminal window will open. You will be abel to navigate inside your linux instance and do whatever sudo commands you wish.
Good luck
I searched thoroughly and could not find any info on this issue.
Currently, I am building a Word Press site, hosted on Google Cloud's Compute Engine. The goal is to build an autoscaling WP site. I am currently attempting to build the instance template, which I can then use to deploy an instance group and subsequently setup the HTTP load balancer.
I am using a base Ubuntu 16.04 image, and from there I installed the rest of the LEMP stack.
I was successfully able to use the SQL proxy to connect to Cloud SQL so that all of the ephermal instances to be deployed will share the same database. To have the proxy initiated each time a new instance is spun up, I am using a startup script:
./cloud_sql_proxy -dir=/cloudsql &
But here's my issue right now: the Word Press files. I can't figure out a way to have all of the instances use the same WP files. I already tried to use Google Cloud Storage FUSE, but when I mount the bucket at the root directory, it deletes all of the WordPress folders (wp-content, wp-admin, wp-includes).
It's as if the instance can't "see" the folders I have in the google cloud storage. Here was my work flow:
setup LEMP with WordPress--got the site working on the front end--all systems go
copied all of the files/folders in my root directory (/var/www/html/) to google cloud bucket
gsutil -m cp -r /var/www/html/. gs://example-bucket/
Then I mounted the bucket at my directory
gcsfuse --dir-mode "777" -o allow_other example-bucket /var/www/html/
But now, when I "ls" inside of the root directory from the Linux terminal, I DON'T see any of the WP folders (wp-includes, wp-admin, wp-content).
My end goal is to have a startup script that:
initiates the DB proxy so all WP instances can share the same DC
initiates the mounting of the google cloud bucket so all instances can share the same WP files
Obviously, that isn't working right now.
What is going wrong here? I am also open to other ideas for how to make the WP files "persistent" and "shared" across all of the ephemeral instances that the instance group spins up.
Try:
sudo nano /etc/rc.local
In the file after:
#By default this script does nothing...
gcsfuse -dir-mode=777 -o allow_other [bucket-name] /var/www/html/[folder-name if apply]
exit 0
Will be work to mount in every scaled instance your bucket.
Hope this help for somebody i realized that you Q has more than 6 months.
:)
Well, there should not be a problem with giving each instance its own WordPress files, unless those files will be modified by the instance.
Each instance can have its own copy of the Wordpress files and all instances can share a common Database. You can host the media files such as images, videos as well as Javascript and CSS files on a Content Delivery Network (CDN)
I'm trying to set-up WordPress to run on Google App Engine.
I'm following the docs over here with MAMP as my local dev environment. The app runs okay through the GAE Launcher, but when I browse the localhost:PORT, I get:
Error establishing a database connection
I've tried changing the define('DB_HOST','localhost'); value to localhost:3306 (my MAMP MySQL port), 127.0.0.1, and even the socket address (:/Applications/MAMP/tmp/mysql/mysql.sock) - but I can't get past the database connection error.
I'm wondering if I have misinterpreted the instructions. I originally thought that the database name, username and password were just placeholders that one was supposed to customize, both in Step 3 (create database and user) and 4 (edit config file). But, hoping I could run it remotely on App Engine, I looked at their sample SQL they use to set up the database and they're using the generic terms (wp_user, wp_password) in their SQL stored in Cloud Storage. Does anyone know what is the correct procedure?
I'm seriously stuck. Can someone help?
Try the following:
Remove the ** from DB_NAME, DB_USER and DB_PASSWORD, i.e. use:
define('DB_NAME', 'wordpress_db');
/** MySQL database username */
define('DB_USER', 'wp_user');
/** MySQL database password */
define('DB_PASSWORD', 'wp_password');
When you create your user in MySQL, make sure you use the #localhost terminology as shown.
If all else fails, start with WordPress 3.5.1.
I found a better way of creating a database by following this video by Google Developers.
If you use MAMP, go to terminal and type
/Applications/MAMP/Library/bin/mysql --host=ipaddressOfCloudSQL -uroot -ppassword
Once you login, you can follow the rest of the instructions as follows.
I don't know if you still have this issue, but this is an issue of where the app SDK is looking for the file MYSQL sockets file (mysql.sock). I'm not sure where whether you can configure this somehow, but this worked for me since the default folder that the SDK looks for the file is /tmp:
cd /tmp
ln -s /Applications/MAMP/tmp/mysql/mysql.sock mysql.sock
If you simply link the MAMP sockets files to the one that google's app engine expects locally, it works. :)
I'm new to Drupal and I'm trying to create multiple sites inside Drupal. I'm trying to create a symlink via the command line. I tried going to my browser to run the new installation for the new website, but I receive a message that says Forbidden Access.
To create the symlink in the terminal:
ln -s ~/Sites/drupal-6.20/sites/sitename2.com
My Drupal-6.20 folder is the root directory of my localhost.
In the browser to start the installation I tried:
http://localhost:80/sitename2.com
Short answer: the web root should be pointing to the index.php in the Drupal root for all of the sites you're hosting on that codebase.
In your case, you are getting an error because there's nothing in the /sites/yoursite.com directory that your webserver can run on it's own.
Longer answer: Configuring Drupal for multiple domains takes a little bit more reading and learning that can be summarized in an SO response.
The guide at http://drupal.org/getting-started/6/install/multi-site is a great place to start, and includes links to videos and additional tutorials in case you need additional help.
I don't know drupal that much, but i know other cms. And i think you should check for "permisions tab".
I worked with joomla, which i think is quite simmilar. And the first time you just have to go to http://localhost/. Installation started. And when it finnished, i had to delete installation folder out of localhost root.
But this is for joomla.