How will you edit Joomla's articles in terminal?
Problem: to understand the place where Joomla stores its articles
I attempted to locate articles unsuccessfully by
locate Masi | xargs -0 grep great
The content is saved within the database inside a table known as
jos_content. Should you desired to perform a find and replace across all of them, open an association towards the database (or use something similar to phpMyAdmin) and run something similar to this:
UPDATE `jos_content` SET `introtext` = REPLACE(`introtext`, 'great', 'awesome'), `fulltext` = REPLACE(`fulltext`, 'great', 'awesome')
Edit that will help you debug the issue:
You will not have the ability to find "jos_content" inside your codebase, due to an element of Joomla which enables you to definitely specify different table prefixes: "jos" may be the default prefix. Within the code, it certainly is written such as this:
#__content, and also the DBO object converts that to "
jos_content" behind the curtain.
However, you don't have to be searching inside your code whatsoever, only the database. You need to have the ability to connect with the database - all of the particulars you'll need come in your
- If you are using Joomla 1.5, the variables you'll need are known as
- In Joomla 1., the variables are named
You will find various ways that you could connect with the database (seek advice from your webhost for those who have phpMyAdmin available: the correct answer is simple to use), but to get it done in the terminal (substitute in your variables previously mentioned):
$ mysql -h $host -u $user -p$password -D $db
observe that there is no space between your -p and also the password. After that you need to have the ability to run your personal SQL, however i would highly recommend creating a backup before you decide to inflict manual changes.
Joomla stores articles inside a MySQL database. If you wish to read/modify/remove articles you will need to use SQL queries.
If you are determined to get this done from the terminal, you can always start the mysql client in the command line and execute your queries after that.