apache server is showing url not found after just increasing the upload_max_filesize in php.ini

August 16, 2019 54 views
Apache Ubuntu 18.04

I have wordpress on 18.04 installed on my droplet. I finished setting up wordpress to allow me to login to wp-login and decided to increase the upload max filesize located at etc/php/7.2/apache2/php.ini to be able to upload a custom theme. After changing the default size to 64M, the server now shows url not found when I try to access the site. I've tried restarting the apache server, rebooting the droplet and returning the default value back. Any ideas would be appreciated, thanks!

1 Answer

Hello,

Are you getting the 404 on internal pages only or on your home page as well? If it is only for your internal pages, you need to make sure that Apache mod_rewrite is enabled. You could do that with the following command:

sudo a2enmod rewrite

Then restart Apache:

systemctl restart apache2

Also also make sure that you have the default Wordpress .htaccess rules. You can get the rules form here:

https://wordpress.org/support/article/htaccess/

If you already have the .htaccess rules there, make sure to have AllowOverride enabled in your Vhost as well. The AllowOverride rule should look something like this inside your Apache Vhost:

<Directory /var/www/html>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Require all granted
</Directory>

If this is still not working. Can you share your Apache config here so that I could advice you further?

Regards,
Bobby

Have another answer? Share your knowledge.