Wooassist

Assistance for Your Woocommerce Store

  • How it Works
  • Pricing
  • Site Maintenance
  • Blog
    • How-To Articles
    • Code Snippets
    • SEO For E-Commerce
    • Theme and Plugin Reviews
    • Wooassist News
    • WordPress/WooCommerce News
    • Interviews
  • About Us
  • Contact
You are here: Home / How-To Articles / Why You Should Use a Development Site for WooCommerce

Why You Should Use a Development Site for WooCommerce

August 14, 2017 By Nick J Leave a Comment

Using a development site (or a staging site) is best practice when working with websites. A development site allows web developers to safely test new features and updates without affecting the live site.

In the absence of a development site, developers will need to test new features and updates on a live site. This is not recommended because such actions can cause critical errors that may break the functionality of the site. In some cases, adding new features and new updates can cause a  website to go down. Without a proper backup, the results could be devastating especially for e-commerce stores.

Testing Ground When Adding New Site Features

If you want to add some new functionality on a live WooCommerce store, it is best to test this first on a development site. Make sure that everything is working before you roll out the new functionality to your customers.

You will most likely have a web developer who will help you add the new functionality that you want. If this is the case, the developer will recommend doing the changes first on a development site. On the off-chance he doesn’t, talk it over with your developer and recommend testing the new functionality on a development site. After adding the new feature, do some user testing on the development site to ensure that everything is working as intended and that no other existing features have been affected.

A Development Site Prevents Errors on Live Site During Site Updates

Aside from when adding new functionality to your WooCommerce store, you should use a development site when updating your site. Doing site updates on your live site can break your site so it is always best to test your updates on a development site. This is especially true when you are dealing with major releases of WordPress and WooCommerce.

How to Create a Development Site

But how do you create a development site on your server? Some hosting providers such as WPEngine provide a staging environment for their customers. If you do not have a development site, you can create one manually. However, do note that creating a development site is a complex process that includes tinkering with your site files and the database. If you are not confident in working with your site files and the database, scroll down to the next section. If you are confident with editing your site files and database, just follow the steps below:

1. Log in to cPanel.

2. Go to your File Manager and go to the public_html folder. Create a ‘dev’ folder there.

How to Create a Development Site - step2

a. Copy your WordPress files from your current directory to the ‘dev’ folder you just created. Select all WordPress files and folders.

How to Create a Development Site - step2.a

b. Click Copy on the top menu.

How to Create a Development Site - step2.b

c. Type in the directory where you want to copy the files into. In this case, the directory is /public_html/dev

How to Create a Development Site - step2.c

3. Create a database. Note: Icons may differ but the names of the items should be the same.

a. Go back to the cPanel home, Click the MySQL Database Wizard under the Databases heading.

How-to-Create-a-Development-Site---step3.a

b. Next to New Database enter a name for your database and click Next Step.

How to Create a Development Site - step3.b

c. Next to Username enter a username. Enter and confirm a password and then click on Create User. Note these down as you will need it later.

How-to-Create-a-Development-Site---step3.c

d. On the next page, you will need to assign privileges for the user on the database. Check the box next to All Privileges and then click Next Step.

How-to-Create-a-Development-Site---step3.d

4. Export your current database.

a. On the cPanel Home, click on phpMyAdmin icon under the Databases heading.

b. Select the database to export. Click on the database name you are working with in the left menu.

How-to-Create-a-Development-Site---step4.b

c. Click on Export option found in the tabs across the top of the screen.

How-to-Create-a-Development-Site---step4.c

d. Click on the radial button for Quick.

How-to-Create-a-Development-Site---step4.d

e. Next, you will need to click on the format of the export file. By default, it should be on SQL, so you don’t need to change anything.

How-to-Create-a-Development-Site---step4.e

f. Click on the Go button to start the export.

How-to-Create-a-Development-Site---step4.f

g. You will be prompted to either open or save the file. Choose the option to save the file and then save it somewhere you’ll remember.

5. Import your Database to the new database you created.

a. Still on the phpMyAdmin screen, on the left side, you should see the name of the new database you created earlier for the dev site.

b. Click on the database you created and click Import in the top menu.

c. Under File to Import, click Browse and select the backup file you previously created. You need to locate where you saved it on your computer.

d. Click Go at the bottom right. Wait for the import to finish.

e. When the database has been imported successfully, you should see a message that the import has successfully finished.

6. Configure the wp-config.php file for the dev site.

a. Click on File Manager located in the Files section of cPanel.

b. Navigate to the folder to where you uploaded WordPress.

c. Click the wp-config.php file, then click the Edit link on the top menu.

How-to-Create-a-Development-Site---step6.c

d. On the edit screen, change the values in the image below to the values you set for the new database you created earlier.

How to Create a Development Site - step6.d

7. Change the site URL for the dev site.

a. The site URL is stored in the WordPress database. In order for the site to load as a dev site, the site URL will need to be changed to the subfolder URL, eg. example.com/dev

b. Go to phpMyAdmin. Select your WordPress database. Then select your wp_options table.

How to Create a Development Site - step7.b

c. Your wp_ prefix may differ depending on your install settings.

d. Click Edit beside either the siteurl or home entries.

How-to-Create-a-Development-Site---step7.d

e. Enter in your new value in the option_value field, then click Go.

How to Create a Development Site - step7.e

8. Ensure that image links in your pages and posts are also changed.

a. These are in the database and not connected to the site URL so they will need to be changed separately.

b. Using the sidebar again, find and click on the wp-posts table.

How-to-Create-a-Development-Site---step8.b

c. Look to the top of the screen and you will see several tabs that run across the page. Click on the SQL tab.

How-to-Create-a-Development-Site---step8.b2

d. You are now on a MySQL editor screen. In the code area, copy the following bit of MySQL.

How-to-Create-a-Development-Site---step8.d

UPDATE wp_posts  SET post_content=(REPLACE (post_content, 'old url','new url'));

e. Be sure to replace <old_url> with the old sitename and <new_url> with the new site name. For instance, our original site was domain.com and the new test site will be at domain.com/dev so the code should appear as below:

UPDATE wp_posts SET post_content=(REPLACE (post_content,  ‘domain.com ',’ domain.com/dev '));

f. Click on the Go button to run the code and change the URLs for all images in the posts. This will also affect any other ‘hard coded’ links that were in the posts that pointed to the original site.

9. Update permalinks.

a. You can now login to your development site’s admin panel and update permalinks with the current settings. Just click update button. 

10. Hide dev site from search engines. 

a. Go to Settings > Reading page on backend, and make sure that the dev site is set to hide for search engines

b. If you are using WordPress SEO plugin by Yoast, you should turn off the sitemap functionality as well.

Create a Development Site Using a Plugin

If the steps in the previous section were too much to swallow, there are several plugins that you can use to create a development site. You can use Duplicator or WP-Staging plugin. Just follow the instructions on the plugin page and you should be good to go.

We hope this article can help you create your own development site. If you need help setting up a development site, the Wooassist team can help out. Just drop us an email. Or if you have questions, you can leave a comment below.

People that read this article also liked

internet-characterHow to Create a Child Theme for Storefront stop-wasting-your-time_300x248Work “ON” Your Business Rather Than “IN” Your Business to Save Time and Increase Revenue for Your E-Commerce Store world-outsourcing-system-featured-image12 WooCommerce Tasks You Should Outsource woocommerce-speedHow to Speed Up Your WooCommerce Store

Filed Under: How-To Articles Tagged With: best practices, how-to, outsourcing, website development, website maintenance, Wooassist, WordPress

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Woocommerce Support

wooassist-team-in-Iloilo

Get 2 Hours of
FREE SUPPORT

We are so confident that you will love our services that we will give you your first 4 hours at a 50% discount

That's 4 hours for only $75

BUY NOW

Happy Wooassist Customers

Awesome! Fantastic! I just went to our site and I see that our site has been fixed!! We are getting orders again thanks to you all at WooAssist! Our site has not worked and looked this good for many months!! You all are awesome! Thank you so much for fixing our site! You have a customer for life! Thanks for making my day wonderful!

Kenneth Arnold

We have been quite pleased working with WooAssist as they help fill in the gaps of our development needs, all at a great price. They are always timely and communicate great, I highly recommend their services.

James Grasty

My husband and I am EXTREMELY pleased with the WooAssist Team. They provide excellent service, are very knowledgeable, and super easy to communicate with. The team ALWAYS has our company's best interests in mind. I love WooAssist! All of you make my job easier.

Jennifer Taft leetaft.com

Categories

  • Code Snippets
  • How-To Articles
  • Interviews
  • SEO For E-Commerce
  • Theme and Plugin Reviews
  • Wooassist News
  • WordPress/WooCommerce News

Recent Posts

  • The Ultimate Guide on How to Set Up Shipping on Your WooCommerce Store
  • WordPress Site Gets Infected
  • Where to Hire a WooCommerce Developer?
  • Recent Spike in Attacks Targeting Outdated WordPress Plugins
  • Security Vulnerability in Spam protection, AntiSpam, FireWall by CleanTalk
Let us support your online store so you can manage your business

Get started today

Get 2 Hours of FREE SUPPORT

We are so confident that you will love our services that we will give you your first 4 hours at a 50% discount

That's 4 hours for only $75

BUY NOW

Free eBook

Your subscription could not be saved. Please try again.
Your subscription has been successful.

YOURS FREE!

5 Things Every Online Store Can Fix On Their Website In The Next Week To Increase Sales

Quick Links

  • How it Works
  • Pricing
  • Blog
  • Contact
  • About Wooassist
  • My Account
  • Checkout
  • Privacy Policy
  • Cookie Policy
  • Terms and Conditions

Wooassist

Australia:
8 Storie St.
CLONTARF QLD 4019

Philippines:
San Miguel St.
Poblacion, Iligan City 9200

Connect

  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Copyright © 2023 · Wooassist

Yours FREE!

5 Things Every Online Store Can Fix On Their Website In The Next Week To Increase Sales