When working with your PrestaShop store, there will be times where you may need or want to update the prices for all products at once. You may be wanting to give a discount to all products as a store-wide sale, or maybe you need to increase your prices due to an increase in supplies or manufacturers costs. While this can be done for each product one at a time, it can quickly become tedious and time consuming, especially if you have hundreds or even thousands of products. There is a way to do it much quicker by using SQL (Structured Query Language). This cannot be done within the PrestaShop back office. If you are hosting with us here at Web Hosting Hub, you can perfofm this task in your phpMyAdmin tool found in your cPanel.

Making mass price changes using SQL in phpMyAdmin

  1. Log into your cPanel.
  2. Now that you are in the cPanel, locate the Databases category and click on the phpMyAdmin icon.
    click phpmyadmin icon
  3. You are led to the main phpMyAdmin page. Take a look at the left hand sidebar and find the name of your PrestaShop database. Click on the name to begin working with it. Our database for this example is named pres764. If you are not sure of your database name, you can find it by following these instructions.
    select database from left sidebar
  4. After clicking on the database name, the right hand panel will populate with a list of tables. More importantly, the work tabs at the top appear. Click on the SQL tab to open the SQL query editor.
    click on the SQL tab
  5. From the SQL query editor, you will need to enter the code to make the price change. Below are a few sample codes to demonstrate increasing and decreasing prices by both specific amounts and percentages. PrestaShop needs to be updated in two tables to handle the change.
    sql query editor

    Sample code to increase all prices by twenty percent (20%).
    UPDATE ps_product_shop SET price = price*1.20;
    UPDATE ps_product SET price = price*1.20;

    Sample code to decrease all prices by 15 cents (.25).
    UPDATE ps_product_shop SET price = price-.15;
    UPDATE ps_product SET price = price-.15;

    Sample code to increase all prices by fifty cents (.15).
    UPDATE ps_product_shop SET price = price+0.50;
    UPDATE ps_product SET price = price+0.50;

    Sample code to decrease all prices by ten percent (10%)
    UPDATE ps_product_shop SET price = price / 1.1;
    UPDATE ps_product SET price = price / 1.1;
  6. Once you have entered a query with your desired price change, click the Go button at the bottom. This will activate the query and make the change. Your prices should now display with the new changes. Below is a before and after example of a price change where we increased the prices by 10%.
    BeforeAfter
    screenshot of prices before change screenshot of prices before change
Did you find this article helpful?

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Have a Question?

If you need some help, submit your question to our Community! We guarantee a response within 60 minutes (8am - 9pm EST, Monday - Friday)

Recent Questions

  1. Site under brute force attack
  2. URLs in Installation of WordPress Don't Redirect
  3. Choosing a Directory With WordPress

Support Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.