Developing a plugin for wordpress is really an awesome feeling. After you submit this to wordpress, it will be available on the plugins section and your plugin will be used worldwide. But the way this shows up in the plugins page is not that eye-catchy. So how come if we can provide some cool graphics (banner) over there so that user will have a better feeling accessing your plugins page. You can provide some message about you or your website using that banner. Here is a live implementation for my WTI Like Post plugin.
Sometimes it comes into mind that nobody should know what’s the CMS that is used for my site. But CMSs do not take care of our feeling. What they actually do is they leave a generator meta tag which says about the CMS that’s being used. I have used Joomla and WordPress and both of them do have this tag. When you look at the source code of your site (WordPress), you will find something like this
<meta name="generator" content="WordPress 5.0.3" />
The main strength of any wordpress website lies in its contents. These contents can be created by mostly using posts. But its quite possible that the content may be huge and then the problem arises. As a normal user, everyone hates to use scrollbar to see the content. Don’t you? In fact as a user, I was not happy with my post size. So I found out a work around for this problem. You can check this link on my site having pagination.
Most of the times we are working on staging server for different projects. Once done with development, we move everything to live. Specifically with wordpress, this is bit complicated as wordpress store almost all data in database. For example it stores site url in database. So we can’t simply move the code & database to live and expect the wordpress project to run perfectly fine. To make things little bit simpler, we can take care of the following things.
Lets assume that our staging site is stage.abc.com where as live site is abc.com and you have already moved the codebase and database.
- open the database and search for stage.abc.com through out the database. You will mainly find this in two tables post table and options table. For this moment, replace the above stage url with the live url in the options table so that we can at least access our site with the live url. For taking care of post table, we have a better option.
- use wordpress search & replace plugin. this provides an easy interface to search for any specific term (stage url) with another term (live url). By using this we can cover up most of the tables.
With the above 2 steps we can easily move a wordpress project.
This is the best possible solution as long as we are using the same table prefix. As the name suggests, table prefix is used for wordpress table names (also for some other cms like Joomla). By using this we can install multiple wordpress projects in a single database. It means we can have one wordpress installation with prefix as “wp_” another one as “wp1_” both in the same database. Whatever steps we have followed above for moving sites will partially work if we are moving the stage database to a different table prefix(wp1_) as compared to the staging one(wp_). Partial in the sense you can access the website but some other functioanlities such as admin end will not work and without admin end, wordpres will be of no use. But no need to worry. We also have a solution to this problem. 🙂
- Follow the top 2 steps as mentioned earlier.
- As already mentioned wordpress stores most of the data in tables, it stores some field values which are related to table prefix.