Wondering how to fix a 403 forbidden error? It's usually due to a missing index.php file. Here's how you can resolve it:
Creating a new index.php file in FileZilla
- FileZilla to access your website files. Use an FTP client like
- Navigate to the folder /home/wplive/web/wp-live.
- Verify that the index.php file is there.
- If it’s not there, create a new index.php file by right-clicking in the list of files and selecting Create new file.
- Right click the new index.php file and select View/Edit to open it in a text editor (If the file doesn't open automatically, use the pop-up prompt and select notepad.exe from C:\Windows\System32 to open it.)
- Copy and paste the following code snippet in index.php.
<?php /** * Front to the WordPress application. This file doesn't do anything, but loads * wp-blog-header.php which does and tells WordPress to load the theme. * * @package WordPress */ /** * Tells WordPress to load the WordPress theme and output it. * * @var bool */ define( 'WP_USE_THEMES', true ); /** Loads the WordPress Environment and Template */ require __DIR__ . '/wp-blog-header.php';
- Save, and close the text editor.
Creating and uploading index.php from your computer
If you're having trouble creating a new index.php file in FileZilla, try creating the file locally, then upload it to /home/wplive/web/wp-live. Here's how to do that in Windows:
- Open a File Explorer window and use the right click menu to create a new text file.
- Double click the new text file to open it in Notepad.
- Add the code snippet above.
- Save and exit the text editor.
- Using FileZilla, upload the new file by dragging it from the File Explorer window to the /home/wplive/web/wp-live folder.
- Right-click on the new file in FileZilla and rename it to index.php.
If index.php already exists
If the index.php file is already present, please contact customer care for help.