Updating your wordpress plugin can be confusing if you’re doing it the first time. It’s easy but can be confusing if you don’t know the right steps.
So here is the step by step process to do it right and quickly without any confusion:
- Make the changes in the code in your plugin code.
- Test the plugin on a test environment before pushing to your Github repository. Assuming you have one.
- Once tested, edit readme.txt. Update change log, version and stable tag.
- Once readme.txt has been updated, update version in your plugin’s main file for example: plugin-name.php.
- Once done push the changes to your git repository.
- Create a release in github. So if version number you are upgrading to is 1.0.1 then create a release with the title “Version 1.0.1”, update the changes in the description, and save it.
- Now we are good with the changes, let’s clone the wordpress plugin svn repo on your system. Repository url will be like this: https://plugins.svn.wordpress.org/your-plugin-name. You can use any SVN client for the same.
- In your SVN repository, go to tags folder, and create a new folder with the name same as version number. So in our case it will be 1.0.1 given version number we are upgrading to is 1.0.1.
- Put the latest code with all the change we made in this newly created folder.
- Now go to trunk folder in the root folder of your SVN repository, delete everything from there and put the latest code.
- Once done, commit the repository back to your WordPress SVN repository.
- Now go to WordPress plugin page and check if version is up and test it on your blog.
How easy was that.
I was wondering the other day if developing a chrome extension is a difficult task. I see thousands of extensions available on chrome web store to make our life easy, but is it really difficult to develop one. There was only one way to find out. It was to actually try and develop one myself.
I opted to create an extension to show meta tags used on a web page. If you are not tech savvy and are not familiar with how to view those, this can be very helpful. To create an extension you need to follow these steps: Continue reading “How to create a Chrome extension to show meta tags used on a webpage in 5 easy steps”
Fresh content on a website serves multiple purposes, including keeping you in the search engine loop. Updating your site is just as important to search engines as it is to your visitors. Search engines generally give high praises to websites that offer new information and sources for search requests. However, being desirable to search engines is not the only reason to update your site frequently.
We often find it hard to get fresh content for our website. We have to go through tonnes of websites, blog articles and much more to get a decent amount of content to share on our website. Continue reading “Using IBM Watson’s Discovery Service to get fresh content”
We daily come across in need of various Linux + ubuntu + centos commands while updating our server and it becomes hard to remember each and every command by tips. So i thought of adding all commands at one place.
- Linux version :
- Check if linux is 32 Bit or 64 Bit :
- Connect to mysql using command line :
mysql -u username -pPassword
- Backup mysql table in a file on server:
mysql -u username -p --database=your_dbname --host=your_hostname --port=3306 --batch -e "select * from table_name" | sed 's/\t/","/g;s/^/"/;s/$/"/;s/\n//g' > your_backup_filename
- Current disk usage:
- Memory usage:
- Delete folder and files in it:
rm -rf folder-name
- Check log activity:
tail -f *path-to-log*. Eg: tail -f /var/log/apache2/error.log
- Enable any module:
sudo a2enmod *module-name*. Eg: sudo a2enmod rewrite
- Zip file:
sudo zip -r file.zip folder/
- To list the largest directories from the current directory in human readable format:
du -sh * | sort -hr | head -n10
- To Recursively list all files in a directory including files in symlink directories:
- Create Swap memory in linux:
- Command 1:
sudo dd if=/dev/zero of=/swapfile bs=1G count=4
- Command 2:
sudo chmod 600 /swapfile
- Command 3:
sudo mkswap /swapfile
- Unzip file:If the
unzip command isn’t already installed on your system, then run:
- Install unzip:
sudo apt-get install unzip
- After installing the unzip utility, if you want to extract to a particular destination folder, you can use:
unzip file.zip -d destination_folder
I recently had a situation where i had to alter huge tables(having >3 Million records). Normally we go with standard process of altering the table, you go to SQL editor, type in your SQL command, execute it and table is altered. But when it comes to huge tables, you may want to alter your approach.
There are 2 ways to alter big table:
- Create a new table(copy of original table), make necessary changes to schema, stop the original table to store new data, copy the original table data to new table, rename tables. And we are done.
Note : when you have table constantly changing then going with this option is not ideal. It will result in data loss and inconvenience for the users.
- Use Percona toolkit
Percona is a reliable tool to alter your tables without any data loss and minimum downtime(almost 0 minutes). Percona doesn’t stop alter, modify options while running, and takes into account the changes done while it is performing the operation. Continue reading “Using percona with AWS RDS – Editing Big DB tables”