How to Install a PHP Tube script to Build Sites like YouPorn, RedTube, xVideos, PornHub, or xHamster Instantly

- 14 mins read

“To build a porn website, you don’t have to spend a fortune, waste time, or have development skills!”

For the past few years, adult video streaming has been on the upsurge with global users using their smartphones, computers, and tabs to stream porn videos through the internet.

World’s largest porn site -PornHub received over 28.5 BILLION visits in 2017. In other words, the website received over 1,000 visits every second and around 78.1 million visits in a single day.

No doubt, adult video streaming has become part of the mainstream video streaming market.

  • Global porn websites get more stable traffic than Netflix, Amazon, & Twitter altogether.
  • 35% of all internet traffic accounts for porn-related content.
  • Global porn market is expected to grow over $97 billion mark. Out of which, over $12 billion is from the U.S alone.

websites like pornhub

Porn is a huge market and starting an adult website like YouPorn, xVideos, xHamster, or PornHub is one of the top grossing business ideas in 2019. The stats are lucrative enough to encourage any aspiring entrepreneur to try out this market by creating porn tube websites like PornHub, xVideos, and others.

If you desire entrepreneurship and intend to create your own adult videos website like PornHub, there are three chief requisites in the entire process:

  • Setting up your business model- How to start an adult videos business?
  • Setting up your porn website- How to create a porn website like xVideos and others? And
  • Stabilizing your website traffic – How to get more visitors to your adult video site?

I have written some detailed articles on the business models and how to get more adult traffic. However, in this article, I shall focus on the trickiest part – How to create a porn website? I shall discuss a very quick and cost-effective way to create a porn website like xHamster, PornHub, xVideos, and others in minutes. So let’s jump into our step-by-step guide

Step 1: Choose a domain name synonymous with your brand

If you have not done it already, then the first step would be choosing a domain name suitable for a porn website. You need to come up with an industry-friendly domain name that signifies the nature of your brand.

You can do this by narrowing down your inclinations and locking some strategic keywords that could offer some automated returns to your porn streaming business. I can suggest a few tricks to assist you in selecting a perfect domain name for the porn website.

You should lock a domain name that is spontaneously vacant in the “.com” dominion. I should not be hard to remember or type and should signify the adult nature. You can take a cue from the biggest porn website like PornHub, which clearly indicates its nature from the name itself.  

After selecting a nice domain name, spare some time to research on the following aspects before locking it –

  • The domain names should be available in all major domains such as .com, .net, .us, .uk, .info, .org etc. Locking all alternations help you prevent others from exploiting your brand identity.
  • All social media names should be available in the original form. This helps you build your brand I identity on social media platforms and makes your social media handles easily discoverable.

Step 2: Choose an adult hosting server

Selecting a good hosting server is of utmost importance when starting a website in the industry that gets over one-third of the internet traffic. It’s a long-term commitment and a wrong decision can simply ruin your adult streaming business before it even begins to rock.

Sadly, many entrepreneurs just overlook this crucial stage, and after spending fortunes on website development, they just go for any hosting server. As a result, they face issues like below in the long term-

  • Sick loading time
  • Crash issues on a huge traffic
  • Buffered video streaming and
  • A penalty from the search engines

Which servers are available?

  • Shared servers: they are slow, inefficient, and not suitable for heavy website traffic.
  • On-site servers: Prefer rack-type severs as they are scalable with an infrastructure upgrade.
  • Hybrid cloud servers: These popular among big sites. You can own your private and can scale the server on the requirement.
  • Cloud servers: not suitable for heavy traffic. They offer static scalability and can cost fortunes in the long run.
  • Elastic cloud servers: They are best for porn websites. They offer dynamic up-scaling and down-scaling of the server’s size on the requirement. You would pay only for space you use dynamically.

How to choose the best adult server?

  • Inspect your prerequisite– Research about the popular server providers and see if they are offering the elastic cloud servers. I would prefer a business that also offers CDN services as it would make my videos buffer free and I can scale my business globally. Find answers to the following questions to decide the perfect package –
    • How many videos are you going to upload?
    • Which geo-locations are you considering for business?
    • Are you planning to expand the business model?
    • Are you planning to include webcam live streaming?

Note: I recommend CDN in all cases. However, it is a necessity when including live streaming or webcam modeling features to your on-demand porn tube site.

  • Check the Service level agreement (SLA): Read and comprehend the SLA carefully to make sure you are getting all that you have been expecting for. Makes sure the server allows adult websites.
  • Scrutinize the safety: Make sure the server fully complies with PCI-DSS for online payment security. Similarly, check if it backs SSL security.

Step 3: Choose a suitable tube script

Turnkey tube scripts are your best bet for building a porn tube website like PornHub, xVideos, xHamster, or others. They offer easiest, inexpensive and fastest methods to launch a porn tube business. For every adult business, ensure that the script meets the following necessities to build your business in a highly competitive arena-

  1. Streaming support

Should be able to stream video-on-demand. You might also want to include the support for live video streaming to gain extra exposure with web cam performances. It’s a choice.

  1. Payment solutions

The script must allow users to make on-site payments to purchase membership subscriptions. It would accommodate PCI DSS compliant payment processors for adult sites.     

  1. HD content streaming-

Other porn sites are allowing even 4K video streaming these days. In all this ensure your site supports at least full HD video streaming. 

  1. Multi bit-rate streaming-

Your tube script must support dynamic bit-rate switching to adjust the stream quality according to the equivalent internet bandwidth or streaming device capability.  

  1. Multi-platform streaming-

Users these days stream not only porn videos on computer website browsers bit also across many other platforms. Here are a few of the cross-platform support your script must offer to let you rule the market:

  • Mobile phone web browser streaming
  • Computer web browser streaming
  • Tablet web browser streaming
  • Smart TV streaming
  • Android App streaming
  • iOS app streaming

You can take a cue from websites like PornHub, which support video streaming across all the above-mentioned platforms. They also have dedicated mobile apps for Android and iOS. 

  1. Monetization methods-

We create porn streaming businesses on multiple revenue models to make money. Here are few other revenue generation models you might want to ensure on your selected tube script for building your own porn tubes websites like xVideos and others:

  • Subscription (SVOD-Like PornHub premium or xVideos Red): Only paid members are allowed to stream.
  • Advertisement (AVOD- like free versions of PornHub and xVideos): Free video streaming is allowed but users also see embed video Ads and Banner Ads on the site and in-between the videos.
  • Transactional (TVOD- more like in combination to all the models): Users purchase a particular video to watch instead of buying a whole subscription package.
  • Hybrid: A combination of two or more models. xVideos’s, PornHub’s, xHamster’s, and RedTube’s overall business is a hybrid as they offer all the options like free streaming with Ads, Membership subscription to avoid ads, and also selected premium content.
  1. Security features Advanced IP access control, Video encryption and Digital Rights Management.
  2. Social media login support Social media integrations to sign up without registration forms.
  3. Video performance analytics Seamless integration with Google Analytics and other adult SEO tools.
  4. Platform Customizability Ensure your business does not run out of options for extending the technical feasibilities and other requirements in the long run. Choose a competent tech stack.

It is wise not to re-invent the wheel to build a cart. A turnkey tube script such as xStreamer represents the same scenario where you do not need a necessary coding skill to create your own porn site. Gone are the days when you needed to be an expert coder to create your adult video streaming site. Today, with a self-hosted tube script like xStreamer, you can –


  • Create an adult video streaming site without coding from scratch.
  • Create a porn site by just using a graphical user interface.
  • Experience free trials and demo versions before buying the script.

Step 4: Install a tube script (a step-by-step guide for xStreamer script)

  1. Server install configuration (recommended settings)
  • Apache web server with mod rewrite enabled, Curl mod enabled.
  • MySQL Cgi-bin Perl Access GD Library 2+ with free type support.
  • PHP 5.4+ with the following configuration
  • safe mode = off
  • open_rggbasedir = (no value)
  • output_buffering = on
  • max_execution_time = 2000 (Recommended or higher)
  • max_input_time = 2000 (Recommended or higher)
  • upload_max_filesize = 2000M (Recommended or higher)
  • post_max_size = 2000M (Recommended or higher)
  • Mplayer + Mencoder ( )
  • LAME MP3 Encoder (
  • Flv2tool (
  • Libogg + Libvorbis (
  • FFmpeg (
  • FFmpeg-php
  1. Site framework: Laravel 5.0
  2. Site Configuration:

Step C 1: Upload the source code to the server directory

Step C 2: Configure the Database from the source code

porn tube 1porn tube 2

Edit new DB with  your DB credentials

porn tube 3

Step C 3: Configure folder permission through CHMOD

porn tube sites

Set permission to CHMOD 777 for the following directories

  • /adult/public/upload/folder
  • /public/upload/folder

Step C 4: Login to the Admin control panel

  • Default Admin URL: your-domain/admincp
  • Default Admin Username: admin
  • Default admin Password: admin

Step C 5: Configure Payment

By default the xStreamer script allows CC bill payment gateway. Go to “PAYMENTS>>Payment Gateway CCbill setting and configure the payment API details. Below is a dummy setup page for the same.

porn tube 5

Step C 6: Post installation setup

Once your installation is complete, you can follow the online guide to setup your xStreamer-based website for going live.

Step 5: Your adult tube site is live now

Once you complete the installation and setup, you are ready to go live and run your business. As the ready-made tube scripts like xStreamer are open-source-code, you can purchase them and own the script for good. Best thing is they are white-labeled and offer enormous customizability.

You need not to pay any monthly or annual subscription fee to use the script. You can also consult any third party or the same developer to customize your script on the requirement. Moreover, you are free to select any server hosting provider.

Make a wise decision

Evaluate your options based on the requirements and business model. Choose a script you find most reliable for your cause. The final cost of building your own website like YouPorn, PornHub, xVideos, or xHamster via a tube script would always be way lesser than that of developing from scratch. xStreamer is my best recommendation if your intention aligns with the business models of websites like xVideos, YouPorn, PornHub, or xHamster.

Join our FREE VIP Facebook Group to know more money making ways from adult sites.