Setting up Larger Themes on Wordpress

Hello, I’m new to render and I’m trying to set up my wordpress site. I have a theme that I’ve purchased from themeforest.net, but it seems the theme is too large and my upload stalls before saying “The link you followed has expired”. I looked at this issue and it seems to have to do with the file size limit on my site. I also found that I can change these settings through the phpini or the .htaccess files however I need to access these file through either an ftp or a program through my host such as cpanel. I’m unfamiliar with cpanel or how to access it by I have filezilla (an ftp) already installed on my computer. I am unsure how to get the proper login credentials for my site though. Does anyone have any suggestions about how to do so or another way to get my theme to upload? Thanks!

Hello,

Can you share the ID for the service that is having problems? You can get it from the URL in the Render dashboard. It starts with srv-.

For sure. It’s srv-c19a82tc2rvrtdg3vqo0. Thanks!

Your service comes with a web shell that allows you to SSH into the service and configure the php.ini or .htaccess file. Are you able to use that to edit the setting?

Thanks for the help Jake! I’m not super familiar with using the shell system though. Would you be able to tell me the steps to do so? I can access the shell through my render dashboard, but I’m having trouble actually getting to the php.ini or .htaccess files

To find your php.ini file, you can run:

$ php -i | grep 'Configuration File'
Configuration File (php.ini) Path => /etc

From there, you can run nano {path to file} (in the example above, it path to file would be /etc). This will open the editor where you can make updates to the file.

The location of the .htaccess seems to vary depending on your Wordpress setup, so I can’t say where that might be for your setup.

Feels like I’m almost there finally, but it seems as though the shell through render dashboard doesn’t come with a text editor like vim or nano. I’m not sure if I can install one since the shell is run through render.

Is there a way I could ssh into the shell through my personal terminal so that I can run text editor commands? Or is there a way to get a text editor onto the render shell that I could use?

Thanks again!

I’m unable to nano into the php.ini or the .htaccess files. It seems the shell through the render dashboard doesn’t have text editor functionality. Is there some way I can add this functionality to render’s shell interface or is there a way for me to ssh into the shell from my local machine so that I can use the text editors of my own terminal?

Hi @allbuckner, if you followed our wordpress deployment guide, you can use yum to install a text editor from the web shell in the Render dashboard. To install vim you might run yum update && yum install vi.

Don’t hesitate to follow up with more questions!

Hey David, thank you for following up. I did use the wordpress deployment guide to set up the the page, yet I seem to be unable to use yum.

I even went back through the steps of the setup to make sure I followed through with everything. The only thing I didn’t do was install the additional plugins but I don’t believe those should make a difference.

I’m not sure if you can check if everything is correct on through your side but the service ID is posted above in my conversation with Jake and I’ve attached a screenshot below.

Thanks again!

Ah, I was looking at the wrong Docker image! Sorry for the confusion @allbuckner. I think the easiest thing is to overwrite the contents of your .htaccess file as follows:

  1. Go into your web shell in the Render dashboard.
  2. Run cat > .htaccess
  3. Paste in the desired contents for your .htaccess file, including the settings needed to allow larger files.
  4. Hit Control-D to end the file and save.

Let us know if there are any issues!

…and you should probably run cat .htaccess before you overwrite the file to see what’s in there currently. Then you can add those additional settings.

Sorry about the delay in response David, but I just wanted to let you know that your suggestion worked like a charm. Thanks so much for the help!

2 Likes

Any time @allbuckner!

@david, Thank you for your help!

In my case it’s stuck here; when I’ve typed cat > .htaccess .

It’s my pleasure @rofkk! After you type in cat > .htaccess, hit enter to run the command. Then you should be able to copy-paste in the contents you want for your .htaccess file. Then hit Control-D and the file should be saved.

1 Like

Thank you, it’s clear now for me. WORKED!

Hi David,

I followed your instructions and the cat .htaccess has the correct settings as per below:

php_value upload_max_filesize 128M php_value post_max_filesize 128M php_value max_execution_time 300 php_value max_input_time 300

However, we are still getting the same error trying to upload a ~16Mb theme. My thinking is that we need to restart the server and the only way I can see this happening is by updating Environment variables (which I did), but still no joy.

Thoughts?