Skip to main content

Install ViralSweep on WordPress

Written by Aldin Rey
Updated today

⚠️ Important: WordPress.com sites are not supported because they block JavaScript.

This guide applies only to self-hosted WordPress sites (WordPress.org)

⚠️ WPRocket Users: If your ViralSweep content isn’t displaying, disable “Minify CSS” and “Minify JS” for the page where the code is added.


Choose Your Install Type

  • Full Page Install

  • Widget Install

  • Lightbox Install


Full Page Install

Use this option if you want your promotion on a standalone page (separate from your WordPress theme layout).

Note: This method will not include your site’s header, navigation, or footer.

If you want your promotion embedded within your site design, use the Widget Install instead.

Step 1: Create the HTML file

  1. In your ViralSweep dashboard, go to:
    Install → WordPress → Full Page

  2. Click Copy Code

  3. Paste the code into a blank HTML file

  4. Save the file with a .html extension (e.g., index.html)


Step 2: Connect via FTP

  • Connect to your website using FTP

  • Navigate to your WordPress root directory

  • Create a new folder for your promotion (e.g., sweepstakes or contest)


Step 3: Upload your file

  • Open the new folder you created

  • Upload your HTML file containing the ViralSweep code


Step 4: Preview your promotion

Visit the URL where your file is hosted
(e.g., yourwebsite.com/sweepstakes/index.html)


Widget Install

Use this option to embed your promotion inside a page or post on your site.


Step 1: Copy your code

In your ViralSweep dashboard, go to:
Install → WordPress → Widget → Copy Code


Step 2: Add the code in WordPress

Go to your WordPress admin and open the page or post where you want the promotion.

If you’re using the Classic Editor:

  • Switch to the Text editor (not Visual)

  • Paste the code

  • Publish the page

  • ⚠️ Do not switch back to Visual Editor, as it can break the code

If you’re using the Gutenberg Editor (Blocks):

  • Add a Custom HTML block

  • Paste the code

  • Preview or publish the page to see the widget


Lightbox Install

Use this option to display your promotion as a popup.


Step 1: Copy your code

In your ViralSweep dashboard, go to:
Install → WordPress → Lightbox → Copy Code


Step 2: Add the code in WordPress

Open the page or post where you want the lightbox to appear.


If you’re using the Classic Editor:

  • Switch to the Text editor

  • Paste the code

  • Publish the page

  • ⚠️ Do not switch back to Visual Editor

If you’re using the Gutenberg Editor (Blocks):

  • Add a Custom HTML block

  • Paste the code

  • Preview the page to confirm the lightbox appears


Need Help?

If you have any questions or run into issues, our support team is here to help.
Click the chat icon in the lower-right corner to start a conversation.

Did this answer your question?