As part of using mac terminal more and more in my own day to day work, I today needed to be able to move all the files and folder from a directory back one directory in the main http folder on my server.
I needed to move all of the files from a file that I unzipped straight to the server, which unfortunately also created another subfolder called PhpEx in my http directory.
So I want to copy of the files and folders from /sites/dunelink.com/http/PhpEx back a directory to /sites/dunelink.com/http
This is how I did it:
mv /sites/dunelink.com/http/PhpEx/* /sites/dunelink.com/http
Notice the * this denotes move everything within the folder but not the actual folder. This will also leave the existing folder untouched exactly where it already is.
If you wish you can then delete the PhpEx folder and all its files with one simple command.
rm -rf /sites/dunelink.com/http/PhpEx
Hope this helps
As we are now using subversion here at Bytewire I thought it might be useful to just blog a few of the essential commands.
svn status – Will show you all the files you have changed pending a commit
svn status -u – Will show you all the files that are pending to update on the repository
svn update – Wil update your files with the files from the repository that have changed.
svn commit -m ‘message’ – Will update the repository and commit your pending files, with a message to describe what you have commited.
svn add ‘filename or foldername’ – cd into the directory of your site and then add ‘http/filename.php’ or http/foldername/ this will update the repository with a new file.
svn rm ‘file or foldername’ – Will remove a file or directory.
svn mv ‘file or filename’ – Used to edit or move a filename so svn mv hello.php hello2.php will move the file hello.php to hello2.php
These are all of the essential commands.
I will be posting more to this list in the coming weeks.
Today I spent alot of the day sorting our development techniques to bring a best practise into what we do. We needed to both be able to connect to the same remote database but both be able to develop locally. So we decided to setup ssh tunnels to our mysql server.
You can quite simply open a ssh tunnel with your server using the following:
ssh -L 3307:domain.name.of.mysqlserver:3306 firstname.lastname@example.org
You can then connect to the server with php using the following,
DB_USER – root – DB_HOST – 127.0.0.1 :3307 – DB_NAME – db_name DB_PASS – root pass
Simply use the following command:
curl -O http://www.yoursite.com/backup/mybackup.tar.gz
Will simply download the file to your local machine and your current location.
To change the current location on your local machine firstly you can find out where you are by hittng ‘ls’ which will list all possible directories and files. Then you can cd into whichever the directory is that you want to end up in.
For example ‘cd Desktop/Backups/’
Then when you run the command it will end up in your current location. If you mess up or want to move that file at a later date you can use the following command:
‘mv myfile.tar.gz newlocation’
Hopefully this helps someone.
Simply use the following command:
Firstly cd into the directory you want the backup to go into so cd /sites/backups/
tar cvfz backupname.tar.gz /sites/yoursite.com/http
This will create a backup up of your entire site and put it into the current folder you are in.
You can see the backup in the folder after running the command simply by “ls”
Simply use the following command:
rm -rf /sites/yoursite/http2
This will force remove all files and folders under the toplevel folder you specified so be warned!
You can also use rm -ri which will prompt you at every folder and file.
At the prompts simply enter ‘n’ for no and ‘y’ for yes.
Untill a few weeks back I was pretty lost in terms of looking for a decent site to browse websites that go for sale, how much they go for and the general concepts that seem to be flying off the shelves.
That was untill I was shown sitepoint, sitepoints site is simple and pretty good. I now end up checking it almost everyday for interesting new sites that go for sale.
Its pretty entertaining especially for me as a business owner and a web designer.
So check it out here Sitepoint Marketplace and see what you think.
If you know of anymore that I dont add them to this list so that I can check them out.
This is a very short post about how to move your domain name if you really dont have a clue.
What you’ll need
Youll need to ask the persons or person hosting your new server which you want to move the domain name too. For the nameservers that they use. You might not know what these are but they will most certainly and are easily obtainable.
Secondly youll need to find your control panel logins for where you have registered your domain name.
Thirdly youll need to ask your domain registrar or current hosts to reduce your domains TTL which stands for “Time To Load” this is the industry standard method of controlling how long it will take for your domain to propogate or change from its current records. It is standard industry practise to acknowledge the TTL. You may not know what this is but your hosts most definitely will. If you get the TTL reduced before you move the domain then it will make the actual domain propogation quicker.
What you need to do
Simply login to your registrars control panel for managing your domains, locate the domain name you want to move to another server then find the option to update dns records!
Once you have located it, youll notice it will probably ask for nameserver1 & nameserver2 – simply enter the nameservers given to you by your new host.
The last step
Finally to complete the movement to your new server make sure you let your new hosts know that you pointed your domain at there nameservers so that they can accept the domains.
After this you should be ready to set the domains up on your new hosting control panel or ask your new hosts to do it for you.
Simple as that.
After doing some pretty intense search engine optimisation over the last few months myself and to some great success I feel its time to share some of my knowledge with others. Over the next couple of articles I will be providing some truly comprehensive tips to help search engine optimise your website!
First step to understand the nature of keywords that drive traffic to the website.
Keyword analysis allows us to have a range of keywords to engage in search engine optimization for.
Know the level of competition for those specific keywords. This will help estimate how difficult/how much time will be required to rank tops for certain keywords.
The number of times the keywords are searched for monthly. This allows us to project the number of visitors we can expect to our site with a successful SEO campaign
The cost per click (CPC) for each keyword. This gives an idea of how cost-effective the SEO campaign will be.
For example, if a keyword costs $1 per click. It means if we are able to rank high for that keyword, every visitor that comes to us from the search we save $1 in CPC cost.
This helps you value SEO.
TOOL USED FOR KEYWORD ANALYSIS
We use the Google keyword tool.
It provides us with comprehensive information regarding, keywords, keyword popularity, keyword competition, CPC.
Have a little play with that tool and then check back in for lesson 2. I would suggest starting with a list of 10 keywords/phrases that you would like to try and rank highly for. Id also suggest picking these keywords before you even start to develop your website it is much easier to build a site withthe keywords identified in mind all the way through than go back and try and make the site reflect the keywords you want it too!
End of Lesson 1
Accepting micro payments and which company to use to do so, has almost always been a hot topic for any game owner or any site owner infact. I decided to try and analyse how we narrowed down our options for our payment gateway on our games.
First things first – indentify possibilities
- 1. Paypal – Of course how could we forget, paypal are the giants of micro payments online and dont they know it!
- 2. GoogleCheckout – Ever growing in size and useability also have good rates.
- 3. Internet merchant number – Full card processing
- 4. Moneybookers – The slightly less recognised long lost brother of paypal
- 5. Amazon micropayments – Very low rates but also fairly poor integration.
Analyse The Options
- Paypal – A massive massive micro payment processor, very easy to integrate and use. However to the point where it is far to easy to make chargebacks for the user. Paypal also do not cover digitally signed goods. People like me and you send our goods electronically right away when the items are paid for in full. Chargebacks are rife and even when you have dine absolutely nothing wrong, you will feel the brunt of some time and time again. At £7.00 and the ability to chargeback well beyond the 3 months card issuer agreement your in real danger using this tool. However the integration is simple and can be easily fully automated which is great. Paypal also charge high fees on transactions and moving money compared to most other companies.
- Googlecheckout has low fees and a very simple to use interface, it also allows you to pay with almost any recognised card without having to be verified on an account before hand, thus is a great processor for card payments. However once again it is extremely easy to initiate and win a chargeback if you are the buyer well after you have received the goods.
- Sms and Phone – A market in which is dominated by the mobile phone operators, they charge SO much that of a £10 premium text msg paymnt to us we will receive around £5 of it. If not less. I would suggest not accepting small amounts via sms as you are likely to receive and even smaller amount of the payout.
Your probable starting to get the gist here many of the large companies make alot of there cash through chargebacks and large fees, googlecheckout transaction fees are pretty good though if you just need something to accept card payments through.
Heres what we did
Unfortunately you will only be able to do this if you are running your own business. Ring your bank manager and ask him to set you up merchant number. (Watch out this is never normally free). If this is your first account of this type your likely to come accross similar problems to us and have to lump the fact the bank may hold onto the money that comes through the account for up to 3 months before releasing it. But hey at least you cant get it spend it and then get chargebacked! We have a 90 days negotiation on our account at current with a promise of a re-assessment within 6 months or so which should put it down to 60 days. Its not ideal, but it does hold some benefits. Next get yourself registered for a service like paypoint.net which have now taken over from the old services of secpay. It will cost you anything from £10 a month to £40 depending on what you want from your account with them. We went with a very basic package to begin with, as it is free to upgrade willy nilly as and when!
The great thing about this is that paypoint use CVS checking, which checks with the banks themselves during payment. Shifting blame of the transaction to them and not us. Thus reducing chargebacks dramatically.