XAMPP and Wordpress - Slow Loading - wordpress

I've recently installed WordPress onto localhost using XAMPP to host it. For some bizarre reason, accessing any page from the WordPress site (including the admin panel) is very slow.
I've tried changing the host file to show:
127.0.0.1 127.0.0.1
127.0.0.1 localhost
But it hasn't made the slightest difference. My machine specs are fairly high, so this doesn't seem to be an issue. I'm currently in the process of downloading a new browser (currently using IE) - although i doubt this'll help the issue.

I've been digesting the web to find a solution for that, and it seems that it depends on your environment; in my case, it was working just fine until I installed Eclipse with Worklight.
Anyway, I just figured out how to overcome the very slow response time.
If Apache and MySQL are not installed as a service (no green checkmark beside the module name in XAMPP control panel) like this...
...follow these steps to do so:
Stop Apache and MySQL and close XAMPP
Go to XAMPP location (by default c:/xampp)
Right-click on xampp_start.exe > "Properties" > "Compatibility" tab; check "Run this program as an administrator"
Repeat the above step with xampp_control.exe (don't run XAMPP now)
Now you will be able to start mysql_start.bat and apache_start.bat
Now open XAMPP (you will get a UAC alert about launching the program as administrator)
You will find a red crossmark beside Apache and MySQL module, just click on the red crossmark beside each module and agree to install as service (if modules are running you have to stop them first)
This really works for me after a very long time-consuming web search with no luck at all. I hope it helps.

In your WordPress wp-config.php file, is the entry for DB_HOST ‘localhost’? If so, change it to ‘127.0.0.1’ and see if it helps.

How about disabling LoadModule cgi_module modules/mod_cgi.so in httpd.config. It might speed up your loading page.

You can try comment out the IPv6 localhost in your host file.
# ::1 localhost
Based on my previous experience, one of the most common reasons of slowness is caused by your code trying to connect to MySQL server via 'localhost', which then resolved to the IPv6 address ::1. However, for XAMPP package, MySQL server is not listening to this address by default. It only listen to the IPv4 address of 127.0.0.1. It will only try to reconnect with 127.0.0.1 after ::1 timeout.
Another option would be to amend your code to connect to MySQL server via '127.0.0.1' directly.

I have read thru a lot of posts and tried out most of the given solutions. Nothing worked for me :( Finally I have got my problem fixed very easily by just adding an exception in windows defender for the folder (located on my sd card) containing all my websites.
I run xampp 3.2.2. on windows 10 on my MS surface Pro and had trouble mostly with WordPress sites running extremely slow (minutes to load). But in general the loading of all sites was not fast enough. Now it went from minutes to the normal 2-3 seconds on WordPress sites with lost of css effects.
Hopes this helps someone ;)

Create a rule and allow XAMPP in Windows firewall did the trick for me. Now loads instantly.

When i developed for wordpress, i too had this issue. My solution was to set up a virtualbox running debian with 2 set cores and 2GB of ram using the netinstall, then set up openlitespeed and the usual with lsphp. XAMPP uses apache but with only essentials, so you do not get php-fpm and other goodies as the idea is on xampp is that it works rather than it works fast.
Since wordpress setups tend to be heavy on resource, not even a high spec machine will run xampp and wordpress well. The easiest solution is to use virtualbox and set up openlitespeed (with 2GB of ram you could install cyberpanel enterprise package for free, ready to use on install with all webserver utilities). This is why most hosts like around 80% including "wordpress recommended" are actually super slow and terrible. Where i work we have our own dedicated server for client wordpress sites that we optimise for to make it very fast, where even a thousand hits on the login page in a second takes barely any resource rather than relying on a shared host for each client.
Apache is actually very slow for your typical plugin heavy wordpress, and needs a lot of tweaking to run fast. Openlitespeed comes ready to use so you only have to configure your hosts file and virtual hosts to get started with a lot of performance

Related

blank page with domain name inside

I set up a server on Ubuntu 20.04, installed and configured UFW and fail2ban, installed nginx, opened 80 and 443 ports. Created a config file for my domain and started the server. It works, but from my IP address (from which I set up the server), I cannot get to the site. When I request a domain, I get a white page on which my domain is written in plain text. But as soon as I register the domain and IP in the hosts file, the site becomes available. I see the problem only from my IP, from others - the site is available. I can provide server settings, but they are corny simple. The site is still pure HTML. Even php didn't install.
Help me find the problem, or at least a direction to fix it.
Thanks!
It might be related to cached DNS queries. Remove the entry from /etc/hosts file and restart your local machine.

http://localhost:8080/ works, http://127.0.0.1:8080/ doesn't works why?

What gives? When I view the page as "http://localhost:8080/" from the local machine, I can create the first (administrator) account and login without any problem. However, when I view the page from any other machine via it's public and/or private IPs, or even http://127.0.0.1:8080/ LOCALLY, I experience the "can't login or create the first (administrator) account" problem. What is going on?
First localhost exist only on your own machine. All other machines will try to look at themselves. Second, the reason for not being able to accessing your computer from another is dependent on your apache configuration. From what you say you probably have a WAMP configuration, these are usually only for development use as they are not secure enough. So, if you want you can of course change the apache parameters, which I don't think is a good thing. Or migrate the wp installation to a public server. If the problem persists on your localhost that is because of your settings in wordpress. Check reading settings in wp-admin or if you cannot connect you can also alter the settings by phpmyadmin. Hope this makes sense.

MAMP "Extras" Wordpress site causes error ERR_CONNECTION_REFUSED

In short, I can create a new MAMP Pro 3 host with success and then download and install Wordpress 4.0 via MAMP Pro's "Extra's" feature also seemingly with success (no errors, ) ...yet it doesn't turn out that way as the browser says, "Error code: ERR_CONNECTION_REFUSED".
Full Details: Hi, I've just installed MAMP Pro for the first time on Mac OS 10.9.5 with all the default settings, the WebStart page loaded in the browser, php looks to be running fine. The problem I'm having occurs when running a preliminary test of MAMP by trying the Extras feature and installing Wordpress 4.0. I get no indication that anything went wrong with the default install yet clicking the button next to the Server Name "Open the hosts web page in a browser"... I am greeted with an error in Google Chrome, Firefox, Safari, etc....
"This webpage is not available. Google Chrome's connection attempt to was rejected. Error code: ERR_CONNECTION_REFUSED
Google Chrome's connection attempt to testwpextra.dev was rejected. The website may be down, or your network may not be properly configured.
Check your Internet connection
Allow Chrome to access the network in your firewall or antivirus settings.
Check your proxy settings
"
I'm not using a proxy, I am running apache as my local user and have confirmed the document root is owned by the same user (with read/write permissions), I turned off firewall/littlesnitch just to be sure, same result in various browsers.
I read some fella saying something about setting up his host with IPv6 but I'm using the MAMP control panel to manage the process for me and don't see settings of that nature. Maybe this is done via the Extended tab with directory or VirtualHost parameters, I don't know... wish I did. Please help! Thanks!
I solved my problem by changing MAMPs ports from the default 8888 etc... to 80,443,3306 (on MAMPs General tab). Now all my includes are broken because MAMP doesn't allow "php_value" in htaccess files...one step at a time i guess. =]

Making local Drupal installation accessible through Virtual Host

I am trying to introduce a staging step in my company's code-production process. We currently have ~10 eng clients who commit code individually, update local codebase - debug/check locally, then we deploy the code to production environment and have other employees QA. Obviously we would like to have a better pre-production test process to help catch bugs before they go live to the public.
My first attempt is to create a staging environment on an extra ubuntu box with the most recent committed code from the eng clients. I then could allow the Product Managers to check this site and find bugs, test features, expose bottlenecks, etc.
What I have: The ubuntu machine (local server) is currently configured as a normal eng client. It has a local drupal installation, complete backup of the db, and all of this is accessible locally. Let's go with mysite.com = official site; and the local staging domain I use on the ubuntu box = ms.com. This local ms.com works just fine, so in essence, I need to just allow other people at the company to navigate to some URL and it acts the exact way ms.com currently behaves. I have DNS servers pointing to the ubuntu box and it is running some side projects out of the /www folder.
In an effort to keep the side projects running, I think my solution is to create a name-based virtual host that points to the directory of the local drupal installation. Is this the right thing to do to achieve my goals? Is there an easier way to open up this local config to the employees.
In trying to set up the virtual host I did the following:
I added the static ip address of the local server to /etc/hosts
I added a virutalHost to /etc/apache2/sites-available with the DocumentRoot dir/DrupalInstallation
I added a2ensite
Then restarted apache.
Halfway success. I can get to the main page, but none of the modules load, I tried loading more hosts/variations, started changing all localhost references to the external, but I don't really know what the underlying issue is and I do not know how to diagnose it. The one interesting bit is that if you click on some of the links, it kicks you back out to the index page of the www folder - I don't think the site alias is 100% sticking for requests.
Let me know if there is any sort of log or report I can share to help diagnose/debug this. Any and all help greatly appreciated - thanks!
It sounds like your specific error accessing pages beyond the homepage is related to not having mod_rewrite enabled/configured.
A different approach:
On a bigger scale, it sounds to me like you might not have what it takes to administer the staging server when something goes wrong. If you're unskilled at linux server admin, save yourself the headache and use a preconfigured virtual appliance (e.g. Quickstart, AegirDev, or Walid) instead of the dedicated box. If your staging box isn't beefy enough to handle hosting virtual machines, then just run the QuickStart install scripts over a base uBuntu build.
Now that you know your staging server is working and runs imported Drupal sites successfully, install git, create a shared repo, and make sure you and your developers are setup to use git as their source control in their IDE.

How to make subdomain in windows 7

i have website http://eshop200.com/
this website got capability of host multiple shop sites with in...
Now issue i am facing is that when we create sub site like this http://pk.eshop200.com/
its working on production server... where as the code version i am running on windows 7.
I have stuck in a situation the error is occuring on subdomain site...
to reproduce that on my local machine... don't no what to do..
any one help in this issue.
You cannot reproduce the effect of wildcard subdomains on the localhost in a windows platform. However, you can make it work for specified subdomains. Just edit your hosts file inside c:\windows\system32\drivers\etc\hosts.
On your development machine, you can created a hosts file entry that makes pk.eshop200.com point to the loopback address 127.0.0.1. Then, you should be able to access your local development server through http://pk.eshop.200.com:[port] in addition to http://127.0.0.1:[port].

Resources