How can you edit Joomla’s articles in terminal?
Problem: to know the location where Joomla stores its articles
I tried to find articles unsuccessfully by
locate Masi | xargs -0 grep great
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The articles are stored in the database in a table called
jos_content. If you wanted to do a find and replace across them all, open a connection to the database (or use something like phpMyAdmin) and run something like this:Edit to help you debug the problem:
You won’t be able to find ‘jos_content’ in your codebase, because of a feature of Joomla which allows you to specify different table prefixes: ‘jos’ is the default prefix. In the code, it’s always written like this:
#__content, and the DBO object converts that to ‘jos_content‘ behind the scenes.However, you don’t need to be looking in your code at all, just the database. You should be able to connect to the database – all the details you need will be in your
configuration.phpfile.$host,$user,$passwordand$db.$mosConfig_host,$mosConfig_user,$mosConfig_passwordand$mosConfig_dbThere are a number of ways that you can connect to the database (check with your hosting company if you have phpMyAdmin available: it’s quite easy to use), but to do it from the terminal (substitute in your own variables from above):
note that there’s no space between the -p and the password. From there you should be able to run your own SQL, but I would highly recommend making a backup before you do any manual changes.